You need the C compiler and the Make utility. So this is the first package called build-essential that should be installed. To install run the following in your terminal
$ sudo apt-get install build-essential
Step2: Install Curl
RVM will need curl to download files. should be installed. Run the following
$ sudo apt-get install curl
Step3: Install Libraries
You need the following libraries;
- readline, which lets you edit lines of text in bash or IRB
- zlib, which Rubygems will need to function
$ sudo apt-get install zlib1g-dev libreadline-dev libssl-dev libxml2-dev
Step4: Install RVM
Now that you're all set up, install RVM itself. To install run
$Append the following line to your ~/.bashrc file.
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM
And then reload your bash environment (or close the terminal window and open a new one).
Step5: Test your RVM
If installation was successful, RVM should now load whenever you open a new shell. This can be tested by executing the following command which should output 'rvm is a function' as shown below.
$ type rvm | head -n 1
Step6: Install Ruby
To install ruby 1.9.3 run the following command.
$ rvm install 1.9.3
The last part of the command above is the version of ruby, so if you want to install other version of ruby just change that e.g, 1.8.7, 1.9.2 e.t.c
Step6: Install Rails
To install rails run the following command
$ gem install rails
Step6: You are done
Though you are done I would recommend you use gemsets to manage your gems.
For more informations about this visit https://rvm.io/gemsets/. Fill free to drop a comment if you need any assistance.
Welcome to Ruby Community:)