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 ). The server works fine, I can install gems, but command line gems don't seem to work ( 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.
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. Otherwise, rehash
is the command that will make the executables available on the path.
I'm new to rbenv from rvm where it just seemed to work. It looks like in rbenv you have to run :
bundle exec gemxx
Or generate binstubs:
https://github.com/sstephenson/rbenv/wiki/Understanding-binstubs
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.