- RVM has given me a bunch of issues over time. Most recently, it wouldn't load for new shells. The
cd
hook also bothers me in a nonspecific way. - Also, we are testing chruby + ruby-build as an organization
- OS X 10.7.5
- MacBook Air
rm -rf ~/.rvm
brew install ruby-build
It gives some rbenv-oriented instructions for adding stuff to your .profile (or .zprofile in my case). Ignored since I'm going to use chruby.
List all available rubies using
ruby-build --definitions
.
I installed my version using
ruby-build 1.9.3-p327 ~/.rubies/ruby-1.9.3-p327
.
Compiling ensued.
The default search directory is ~/.rubies
.
brew install chruby
Post-install message asks me to put this in my .zshrc
file:
source /usr/local/opt/chruby/share/chruby/chruby.sh
Also this to auto-detect .ruby-version
files
source /usr/local/opt/chruby/share/chruby/auto.sh
I create a .ruby-version file in my project dir:
echo "ruby-1.9" > .ruby-version
And one in my home directory to set the default ruby:
echo "ruby-1.9" > ~/.ruby-version
In my project dir:
gem install bundler
bundle install
The bundle gave me some issues regarding ruby location, so I deleted everything in ~/.gem/ruby/
and it worked fine after.
Profit.