Skip to content

Instantly share code, notes, and snippets.

@dongyuwei
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dongyuwei/9200618 to your computer and use it in GitHub Desktop.
Save dongyuwei/9200618 to your computer and use it in GitHub Desktop.
common workflow(steps) to use rbenv and bundle.
  1. install rbenv and ruby-build plugin via git clone.
  2. rbenv install --list
  3. rbenv install target-ruby-version(such as rbenv install 2.1.0)
  4. echo $PATH # ~.rbenv/shims should be the head of path. Ensure gem is ~/.rbenv/shims/gem, not the old system gem.
  5. rbenv local target-ruby-version
  6. gem install bundle -V keep eyes on the gem cmd path, which should be ~/.rbenv/shims/gem.
  7. rbenv rehash
  8. bundle install --path=vendor/bundle bundle path should be ~/.rbenv/shims/bundle
  9. bundle exec some-shell-cmd

If you have any problems, do check the $PATH first(echo $PATH).

@dongyuwei
Copy link
Author

bundle install --system will install the rubygems in system path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment