How to install Rails

Rails is the web application framework written in Ruby language. In this tutorial I will show you how to install Rails, and how to solve some problems in installing it. Because it also gave me a headache when I first tried to install it.

First, you have to make sure that rails isn’t already installed. As usual, type this on your command line window:

gem list

It will give you a list of the gems that are installed. Gems are simply components that adds functionality to the web applications that you’re going to create.


In the screenshot above, you can see that rails isn’t installed yet.

To install rails, simply type:

gem install rails

Wait for about 3-5 minutes. If it returns an error like this:

ERROR:  While executing gem ... (Gem::FormatException)
builder-2.1.2 has an invalid value for @cert_chain

Then you’re lucky since were going to solve it here.It seems like Ruby version  1.9.2p180 isn’t compatible with Gems version 1.7.1

So what we have to do is to downgrade either of them. But to make life easier, I’ll choose to downgrade Gems. To do that just type:

gem update --system 1.6.2

And that command will downgrade 1.7.1 to 1.6.2.


Now you’re ready to install rails. Open up a new command line window just to be sure.

If you see something like the one below, then you’re good to go. Just wait for about 5 minutes to finish downloading and installing rails.


One thought on “How to install Rails

  1. I just ran into this same issue. I was installing two servers side by side and from the time I downloaded rubygems on both systems (just minutes apart), there was an update. >< I thought… oh cool new software!, but yea… ended up having to downgrade.

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