Modified from Rob Seaman’s post.
multiruby is a great way to make sure your ruby code runs on the multitude of ruby versions (it’s part of ZenTest). It doesn’t install macruby by default. Here are instructions on how to set it up.
Since I installed macruby from the package installer my macruby files are in
/Library/Frameworks/MacRuby.framework/Versions/0.4/. If your macruby files are somewhere else, adjust accordingly.
First make sure you already have multiruby setup for other versions (don’t proceed if this doesn’t work):
One problem I had with the above command was that I had
RUBYOPT set in my .profile. This was calling each of these ruby versions with
RUBYOPT=rubygems when trying to install. This won’t work because rubygems is one of the things you’re trying to install. Make sure you unset this variable etc. before trying to setup multiruby.
ln -s /Library/Frameworks/MacRuby.framework/Versions/0.4/usr ~/.multiruby/install/macruby-0.0.4 sudo ln -s ~/.multiruby/install/macruby-0.0.4/bin/macruby ~/.multiruby/install/macruby-0.0.4/bin/ruby sudo ln -s ~/.multiruby/install/macruby-0.0.4/bin/macgem ~/.multiruby/install/macruby-0.0.4/bin/gem touch ~/.multiruby/versions/macruby-0.0.4.tar.gz # fake-out
multiruby -e "p 1+1"