Justin's Notes

A place to share what I have learned

Chruby

Background

I have been using RVM for installing and managing ruby. Recently, I have been hearing about chruby and how it would make my terminal run a bit fast because it is a little less invasive than RVM. I also like the simplicity of it all.

0. Before You Start

Remove current ruby version manager. If you have RVM like I did, then run:

rvm implode

1. Ruby-Install

Chruby dosen’t handle installing ruby but ruby-install does:

  • install ruby-install
brew install ruby-install
  • install any version of ruby
ruby-install ruby 2.1.2 # or whatever version you need

2. Setup chruby

  • Install chruby
brew install chruby
  • Config terminal by putting the below lines into your .profile or .bashrc file
source /usr/local/share/chruby/chruby.sh
source /usr/local/share/chruby/auto.sh

3. Set default version of ruby

echo "ruby-2.1.2" > ~/.ruby-version