How to Install Ruby on Rails on Ubuntu 12.04 Pangolin through RVM

In this post I am going to tell you the method to install Ruby on Rails on Ubuntu 12.04 Pangolin with the help of RVM. This process is the quickest and easiest way to install the framework on the Virtual Server.

Ruby on Rails is one of the most renowned web application framework for the developers to easily create pages and applications. It is an open source application and can be easily installed on a virtual server with the help of some useful tools. If you are trying to install the Ruby on Rails application without these tools then you will either get struck in the confusing process or will waste a lot of time.

In the below section of the post I will teach you how to install Ruby on Rails on Ubuntu 12.04 Pangolin with the aid of RVM (Ruby Version Manager). I had broken this process in different parts so that you can follow the tutorial easily. Without wasting much more time on the introduction part; Lets get started with the installation tutorial:

STEP ONE

Download the installation package from the official website and to ensure that you are installing the latest updated application; run the below provided command:

sudo apt-get update

Install the RVM (Ruby Version Manager) application that enables the user to install different versions of Ruby on a single server.

Before proceeding to the next steps; make sure that you had installed curl on your system. If not! Then you can download it by the below provided command:

sudo apt-get install curl

to start installing the Ruby Version manager; execute the below provided command in the terminal:

\curl -L https://get.rvm.io | bash -s stable

After the successful installation of RVM; you have to start a new shell session. You can easily do this by:

source ~/.rvm/scripts/rvm

Please note that the RVM requires a few requirements to be fulfilled before it works on your system; to know these dependencies follow the below command:

rvm requirements

After executing the command; RVM will show a text file. Search for the below provided paragraph in that file:

# For ruby:

apt-get –no-install-recommends install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config libffi-dev

To update the system as per the requirements; you are subjected to follow the below provided command:

sudo apt-get –no-install-recommends install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config libffi-dev

On occasion the zlib package may be reported as missing. The RVM page describes the issue and the solution in greater detail here.

STEP TWO

After installing the RVM on the system; it is really an hassle free task to install Ruby through it

rvm install 1.9.3

After this step Ruby will be successfully installed. To make the Ruby V 1.9.3 as default; follow the below provided command:

rvm use 1.9.3 –default

STEP THREE

At this step we will be installing RubyGems. To start the installation through RVM; execute the below provided command in the terminal:

rvm rubygems current

STEP FOUR

At this final step we will be installing Rails. To start the installation of Rails through RVM; execute the below provided command in the terminal:

gem install rails

Conclusion

After a few minute of installation; Ruby on Rails will be successfully installed on your server. Finding some issues? You can share that with me in the input section below. Stay Connected with Webgranth for more tutorials about

Williams Heilmann

Williams Heilmann has been associated with PSDtoWordPressExpert for many years. He has extensive experience as a web developer and works with this company to offer the best WordPress solutions to suit the specific needs of the clients. Also, he has got a flair for writing which he consumes in writing the informational blogs for submission on different websites.