[英]rbenv command line gems setup with system install
I am using the chef rbenv
recipe ( https://github.com/fnichol/chef-rbenv ), doing a system wide install (goes into /usr/local/rbenv) with the rails lastmile cookbook ( https://github.com/DanThiffault/rails-lastmile ).我正在使用厨师
rbenv
食谱( https://github.com/fnichol/chef-rbenv ),使用 rails lastmile 食谱( https://github. com/DanThiffault/rails-lastmile )。 The server works fine, I can install gems, but command line gems don't seem to work ( valkyrie
, mysql2psql
).服务器工作正常,我可以安装 gems,但命令行 gems 似乎不起作用(
valkyrie
, mysql2psql
)。
Do I need to do additional work to get this working?我是否需要做额外的工作才能使其正常工作?
You have to run rbenv rehash
everytime you install a gem with a command line script when using rbenv.使用 rbenv 时,每次使用命令行脚本安装 gem 时都必须运行
rbenv rehash
。
If you installed the gems in a bundle and are running the command from within the directory where the Gemfile
is located, @riley's suggestion might be enough.如果您将 gem 安装在一个包中并从
Gemfile
所在的目录中运行命令,@ Gemfile
的建议可能就足够了。 Otherwise, rehash
is the command that will make the executables available on the path.否则,
rehash
是使可执行文件在路径上可用的命令。
I'm new to rbenv from rvm where it just seemed to work.我是 rvm 的 rbenv 新手,它似乎可以正常工作。 It looks like in rbenv you have to run :
看起来在 rbenv 中你必须运行:
bundle exec gemxx
Or generate binstubs:或者生成 binstubs:
https://github.com/sstephenson/rbenv/wiki/Understanding-binstubs https://github.com/sstephenson/rbenv/wiki/Understanding-binstubs
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.