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 | 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

Step3—Install RubyGems
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:

One thought on “How To Install Ruby on Rails on Ubuntu with RVM

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s