$ rvm implode
to remove rvm completely, thanks Wayne.$ brew install rbenv
to get the new hawtness!$ brew install ruby-build
to allow us to install Rubies (rbenv
doesn't have an install command).
to ignore the version files rbenv makes add this to ~/.gitconfig_global
.rbenv-version
to ignore your locally bundled gems add this to ~/.bundle/config
:
---
BUNDLE_PATH: vendor/bundle
finally add to your bash profile (probably ~/.bash_profile
), so that rbenv is instantiated with your shell
eval "$(rbenv init -)"
--restart your shell--
Well, your Rubies are gone, and your gemsets with them. So let's install a Ruby and get a project working again.
$ rbenv install 1.9.3-p0
(specify your favorite flavor if you're not ready for 1.9.3)
$ rbenv rehash
to rebuild rbenv's shims, when you install a new system system gem with a binary (like rake
).
$ rbenv global 1.9.3-p0
sets a global version of Ruby to be used (instead of your system Ruby).
$ rbenv local 1.9.2-p290
sets the version of Ruby for a specific project directory by creating a .rbenv-version
file (which we ignored earlier)
$ gem install bundler
to get bundler installed into your current Ruby's gemset.
running bundle
in your project directory will now install the gems in your Gemfile
directly into your project in vender/bundle.
last, run your project in the context of your bundle: $ bundle exec rails s
Good gist :)