Fix to the Error installing Rails on Mac OS X !

Hi,

I was trying to install Rails on my mac by using the command:

sudo gem install rails

But it threw me the following error

ERROR:  Error installing rails:

ERROR: Failed to build gem native extension.

This happens if I haven’t installed the Xcode Command Line Tools properly. To do that

Run xcode-select –install in terminal

This would install the Xcode command line tools. Thats it, you are good to go.

Re run the sudo gem install rails in the terminal and it will install the rails.

To verify if the rails is installed properly. Run rails -v in terminal.

This shows us the version of the rails installed on the machine.

Cheers,

SZ

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s