- install rbenv and ruby-build plugin via git clone.
rbenv install --list
rbenv install target-ruby-version
(such asrbenv install 2.1.0
)echo $PATH
# ~.rbenv/shims should be the head of path. Ensure gem is ~/.rbenv/shims/gem, not the old system gem.rbenv local target-ruby-version
gem install bundle -V
keep eyes on thegem
cmd path, which should be~/.rbenv/shims/gem
.rbenv rehash
bundle install --path=vendor/bundle
bundle path should be~/.rbenv/shims/bundle
bundle exec some-shell-cmd
If you have any problems, do check the $PATH first(echo $PATH
).
bundle install --system
will install the rubygems in system path.