This is quite trivial and very easy. I wanted to use the same version of ruby on my mac as is running on our production servers (Ruby Enterprise Edition).
Firstly, do a
gem list
and keep this information. You will need to reinstall all your gems once you have successfully installed REE.
Download REE from http://www.rubyenterpriseedition.com/
tar xvfz ruby-enterprise-X.X.X
sudo ./ruby-enterprise-X.X.X/installer
I suggest changing the default location to just /opt/ruby-enterprise – as you are unlikely to need to roll back the symbolic links in your development environment.
Once it is installed, then you need to make sure that you use it for all your gems, ruby, rake tasks. To do this we will sym link in all the executables into /usr/bin
Find any previous versions of ruby
whereis ruby
and
which ruby
Cleanup – backup and remove any old versions and the associated ruby, gems, rake, irb, cap, capify, erb so they are not on your path.
Then sym link from /usr/bin to opt/ruby-enterprise/bin with all the executables that you may require….
sudo ln -s -f /opt/ruby-enterprise/bin/ruby /usr/bin/ruby sudo ln -s -f /opt/ruby-enterprise/bin/cap /usr/bin/cap sudo ln -s -f /opt/ruby-enterprise/bin/capify /usr/bin/capify sudo ln -s -f /opt/ruby-enterprise/bin/erb /usr/bin/erb sudo ln -s -f /opt/ruby-enterprise/bin/gem /usr/bin/gem sudo ln -s -f /opt/ruby-enterprise/bin/irb /usr/bin/irb sudo ln -s -f /opt/ruby-enterprise/bin/rails /usr/bin/rails sudo ln -s -f /opt/ruby-enterprise/bin/rake /usr/bin/rake sudo ln -s -f /opt/ruby-enterprise/bin/rdoc /usr/bin/rdoc
Do a gem list to see what ruby-enterprise came bundled with.
Now you will need to install all your gems again – that you noted earlier.
Tags: rails