Tuesday, October 5, 2010

Installing RVM System Wide

Today I got introduced to one very nice solution developed by Wayne E. Seguin. It is called RVM and it is recommended for ruby developers working on Debian machines.

What is RVM ?

Simply RVM allows users to install multiple ruby versions and switch between them easily. It also allows having multiple sets of gems for different projects easily.

Installation Steps

Before getting into details, I would like to say that any steps mentioned here are grabbed from these two links. I only collected parts from them and added them in an easy way

http://rvm.beginrescueend.com/rvm/install/
http://rvm.beginrescueend.com/deployment/system-wide/
http://rvm.beginrescueend.com/rubies/installing/

  1. from your linux console run
  2. bash < <( curl -L http://bit.ly/rvm-install-system-wide )
  3. you now have rvm command installed here at /usr/local/lib/rvm
  4. After installation you should add this line below to your profile
  5. [[ -s "/usr/local/lib/rvm" ]] && . "/usr/local/lib/rvm"
  6. To do so, i added the line above at the end of the /etc/profile file. But, you can add it in other places according to your needs. Read more about profiles here
  7. then run this one
  8. source /usr/local/lib/rvm

Now you are ready to install any versions of Ruby and Ruby Enterprise versions available

For me, I installed Ruby 1.8.7 and its enterprise version this way

  1. rvm install 1.8.7
  2. rvm install ree-1.8.7

That’s it
Hope you enjoy RVM as I hope I enjoy it as well

No comments: