Installing ruby with rvm under ubuntu 10.10
RVM is a shell scripts enabling management of multiple ruby environments.
Following the next steps, you should able to install and run different rubies versions.
1. Setup your ubuntu environment:
sudo apt-get install libruby1.8 zlib1g-dev libssl-dev libreadline5-dev build-essential curl git-core
2. Install the Ruby Version Manager:
Run this line in your bash as normal user
$ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
This will install the rvm under the ~/.rmv directory of your home.
Now add this line in you ~/.bashrc
Now place the following line at the end of your shell’s loading files (.bashrc or .bash_profile for bash and .zshrc for zsh), after all PATH/variable settings:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm
This loads RVM into a shell session.
Ensure that there is no ‘return’ from inside the ~/.bashrc file, otherwise rvm may be prevented from working properly.
Now close your shell and open a new one in order to use RVM.
3. Installing rubies:
At this step RVM should be installed and properly configured, so we can install every rubies as we want.
$ rvm install ruby-1.9.2 $ rvm install ruby-1.8.7 $ rvm list //show installed rubies $ rvm use ruby-1.9.2 --default //set this version as default