Slinky
Slinky

Reputation: 5832

Ruby Gem Install Issues

I am using the 'stock' version of Ruby 1.8.7 that came with my Mac OS X (Lion) and when I try to install Rails I get missing header file errors. How can I fix?

Thanks

sudo gem install rails


Building native extensions.  This could take a while...
ERROR:  Error installing rails:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h

Upvotes: 1

Views: 95

Answers (1)

tadman
tadman

Reputation: 211740

The XCode "Command Line Tools" package includes not only the compiler, but the developer headers for many different packages, Ruby included.

The gem tool really should check for the presence of this before blindly trying to execute things, but that does not appear to be the case, and instead you get cryptic messages like this.

Upvotes: 1

Related Questions