Error installing Rails

Hi guys

I’m a Rails virgin. I’m pulling my hair out with the install.

So far, I’ve checked that I’ve got Ruby & Gems, see below;

Pauls-iMac:~ pauldoran$ ruby --version
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]

Pauls-iMac:~ pauldoran$ gem --version

I’m trying to install Rails as follows;

Pauls-iMac:~ pauldoran$ sudo gem install rails

But get the following error message;

ERROR: Error installing rails:
ERROR: Failed to build gem native extension.

mkmf.rb can’t find header files for ruby at

Gem files will remain installed in
/Library/Ruby/Gems/1.8/gems/json-1.7.6 for inspection.
Results logged to

I’ve read the forum for similar errors but non of the fixes seem to

Any help would be so appreciated.

This can be related you your Mac’s XCode issue. The main cause which I
remind, may be you end up having more than one XCode versions or your
system is messed up. Re-installing you XCode should resolve your problem

On 5 February 2013 07:37, Paul D. [email protected] wrote:

Hi guys

I’m a Rails virgin. I’m pulling my hair out with the install.

I advise using rvm to install ruby and rails


First, install rbenv/ruby-build or RVM

Then install ruby 1.9.3

Then install rails

Good luck!

Den tisdagen den 5:e februari 2013 kl. 08:37:23 UTC+1 skrev

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs