Step1 — Install Ruby with RVM
Before we do anything else, we should run a quick update to make sure that all of the packages we download to our VPS are up to date:
sudo apt-get update
If you do not have curl on your system, you can start by installing it:
sudo apt-get install curl
To install RVM, open terminal and type in this command:
\curl -L https://get.rvm.io | bash -s stable
While doing installation rvm will give some end message like this.
Installing RVM to /home/ubuntu/.rvm/ Adding rvm PATH line to /home/ubuntu/.profile /home/ubuntu/.bashrc /home/ubuntu/.zshrc. Adding rvm loading line to /home/ubuntu/.bash_profile /home/ubuntu/.zlogin. Installation of RVM in /home/ubuntu/.rvm/ is almost complete: * To start using RVM you need to run `source /home/ubuntu/.rvm/scripts/rvm` in all your open shell windows, in rare cases you need to reopen all shell windows.
Step2 —Install Ruby
Once you are using RVM, installing Ruby is easy.
rvm install ruby-2.1.2 or rvm install 2.1
The next step makes sure that we have all the required components of Ruby on Rails. We can continue to use RVM to install gems; type this line into terminal.
rvm rubygems current
Step4 — Install Rails
Once everything is set up, it is time to install Rails.
To start, open terminal and type in:
gem install rails
Visit for latest updates on this post: http://railsroot.com/setup_rails