Skip to content

Instantly share code, notes, and snippets.

@jackfranklin
Forked from brentertz/rvm2rbenv.txt
Created June 21, 2012 18:42
Show Gist options
  • Save jackfranklin/2967682 to your computer and use it in GitHub Desktop.
Save jackfranklin/2967682 to your computer and use it in GitHub Desktop.
Switch from RVM to RBENV
## Prepare ###################################################################
# Remove RVM
rvm implode
# Ensure your homebrew is working properly and up to date
brew doctor
brew update
## Install ###################################################################
brew install rbenv
brew install ruby-build
## Config ####################################################################
# Instantiate rbenv with your shell (choose preferred file - .profile, .bash_profile, .zshrc, etc)
printf 'eval "$(rbenv init -)"' >> ~/.profile
# Remove the RVM stuff from your .profile - It probably looks like...
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
# Reload your profile
. ~/.profile
# Add autocompletion to IRB
touch ~/.irbrc
printf "require 'irb/completion'" >> ~/.irbrc
## Usage #####################################################################
rbenv
# Choose a ruby flavor version to install
rbenv install 1.9.3-p0
rbenv install 1.9.2-p290
# Rehash rbenv shims (run this after installing binaries)
rbenv rehash
# Set the global Ruby version and install bundler globally
rbenv global 1.9.3-p0
#SET GLOBAL RUBY BEFORE INSTALLING GEMS
gem install bundler --pre
gem install OTHER_GLOBAL_GEMS # eg) Rails, Heroku, etc - NOTE: You need to do this for each ruby version.
rbenv rehash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment