# Problems with gems and Ruby 1.8.7

**URL:** <https://www.ruby-forum.com/t/problems-with-gems-and-ruby-1-8-7/172284>\
**Category:** Ruby\
**Created:** [July 18, 2009, 3:57pm UTC](https://www.ruby-forum.com/t/problems-with-gems-and-ruby-1-8-7/172284 "2009-07-18T15:57:51Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![hgtesta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/919ad9/32.png) [@hgtesta](https://www.ruby-forum.com/u/hgtesta)\
**Post date:** [July 18, 2009, 3:57pm UTC](https://www.ruby-forum.com/t/problems-with-gems-and-ruby-1-8-7/172284/1 "2009-07-18T15:57:51Z")

</div>

Hi all,

I have ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0]  
installed in my Snow Leopard Preview Release. Rails runs OK, but I can’t  
install some gems with native extensions. The following error appear:

$ sudo gem install bluecloth  
Password:  
Building native extensions. This could take a while…  
ERROR: Error installing bluecloth:  
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

Gem files will remain installed in  
/Library/Ruby/Gems/1.8/gems/bluecloth-2.0.5 for inspection.  
Results logged to  
/Library/Ruby/Gems/1.8/gems/bluecloth-2.0.5/ext/gem\_make.out

The same error happens with many gems. I tried already update rubygem  
(the installed version is 1.3.4), but the problem persist. Any ideas?

Thank you!

Henrique

---

<div class="post-metadata">

**Author:** ![hgtesta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/919ad9/32.png) [@hgtesta](https://www.ruby-forum.com/u/hgtesta)\
**Post date:** [July 19, 2009, 5:38am UTC](https://www.ruby-forum.com/t/problems-with-gems-and-ruby-1-8-7/172284/2 "2009-07-19T05:38:47Z")

</div>

I decided to install another version of ruby at /usr/local/ruby-1.8.6  
and point executables (erb, gem, ruby, etc.) to the new ruby dir. All  
went right, and ruby (1.8.6) and gem are working. But when I try to  
install any gem, I get:

$ sudo gem install rails  
Password:  
dyld: NSLinkModule() error  
dyld: Symbol not found: \_ENGINE\_load\_4758cca  
Referenced from:  
/usr/local/lib/ruby/1.8/i686-darwin10.0.0b4/openssl.bundle  
Expected in: flat namespace

Trace/BPT trap

It seems an error unrelated to the one before. Now I can’t install any  
gem 😕  
Any hint?

Thank you!

---

<div class="post-metadata">

**Author:** ![hgtesta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/919ad9/32.png) [@hgtesta](https://www.ruby-forum.com/u/hgtesta)\
**Post date:** [July 22, 2009, 4:08am UTC](https://www.ruby-forum.com/t/problems-with-gems-and-ruby-1-8-7/172284/3 "2009-07-22T04:08:13Z")

</div>

On Jul 18, 2009, at 06:57, Henrique T. wrote:

> ERROR: Error installing bluecloth:  
> /Library/Ruby/Gems/1.8/gems/bluecloth-2.0.5 for inspection.  
> Results logged to  
> /Library/Ruby/Gems/1.8/gems/bluecloth-2.0.5/ext/gem\_make.out
> 
> The same error happens with many gems. I tried already update rubygem  
> (the installed version is 1.3.4), but the problem persist. Any ideas?

You also have the dev tools installed?

---

<div class="post-metadata">

**Author:** ![hgtesta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/919ad9/32.png) [@hgtesta](https://www.ruby-forum.com/u/hgtesta)\
**Post date:** [July 22, 2009, 2:55pm UTC](https://www.ruby-forum.com/t/problems-with-gems-and-ruby-1-8-7/172284/4 "2009-07-22T14:55:02Z")

</div>

Eric H. wrote:

> On Jul 18, 2009, at 06:57, Henrique T. wrote:
> 
> > ERROR: Error installing bluecloth:  
> > /Library/Ruby/Gems/1.8/gems/bluecloth-2.0.5 for inspection.  
> > Results logged to  
> > /Library/Ruby/Gems/1.8/gems/bluecloth-2.0.5/ext/gem\_make.out
> > 
> > The same error happens with many gems. I tried already update rubygem  
> > (the installed version is 1.3.4), but the problem persist. Any ideas?
> 
> You also have the dev tools installed?

Thank you for the response. Yes, I had… but since I didn’t find a  
solution, I reinstalled Leopard. It is better wait for the final release  
of Snow Leopard 😕

Henrique

---

<div class="post-metadata">

**Author:** ![hgtesta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/919ad9/32.png) [@hgtesta](https://www.ruby-forum.com/u/hgtesta)\
**Post date:** [July 30, 2009, 6:46pm UTC](https://www.ruby-forum.com/t/problems-with-gems-and-ruby-1-8-7/172284/5 "2009-07-30T18:46:04Z")

</div>

Henrique T. wrote:

> Eric H. wrote:
> 
> > On Jul 18, 2009, at 06:57, Henrique T. wrote:
> > 
> > > ERROR: Error installing bluecloth:  
> > > /Library/Ruby/Gems/1.8/gems/bluecloth-2.0.5 for inspection.  
> > > Results logged to  
> > > /Library/Ruby/Gems/1.8/gems/bluecloth-2.0.5/ext/gem\_make.out
> > > 
> > > The same error happens with many gems. I tried already update rubygem  
> > > (the installed version is 1.3.4), but the problem persist. Any ideas?
> > 
> > You also have the dev tools installed?
> 
> Thank you for the response. Yes, I had… but since I didn’t find a  
> solution, I reinstalled Leopard. It is better wait for the final release  
> of Snow Leopard 😕
> 
> Henrique

Hi I’m having the same problem, latest copy of xcode, dev tools and snow  
leopard but I cant get some of the gems to build. It seems like gem  
can’t find the header files for Ruby…Any ideas?

Installing ri documentation for diff-lcs-1.1.2…  
Installing RDoc documentation for diff-lcs-1.1.2…  
Building native extensions. This could take a while…  
ERROR: Error installing dnssd:  
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

Gem files will remain installed in  
/Library/Ruby/Gems/1.8/gems/dnssd-0.7.1 for inspection.  
Results logged to  
/Library/Ruby/Gems/1.8/gems/dnssd-0.7.1/ext/gem\_make.out  
Successfully installed echoe-3.1.1

---

<div class="post-metadata">

**Author:** ![hgtesta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/919ad9/32.png) [@hgtesta](https://www.ruby-forum.com/u/hgtesta)\
**Post date:** [July 30, 2009, 7:51pm UTC](https://www.ruby-forum.com/t/problems-with-gems-and-ruby-1-8-7/172284/6 "2009-07-30T19:51:34Z")

</div>

> Hi I’m having the same problem, latest copy of xcode, dev tools and snow  
> leopard but I cant get some of the gems to build. It seems like gem  
> can’t find the header files for Ruby…Any ideas?
> 
> Installing ri documentation for diff-lcs-1.1.2…  
> Installing RDoc documentation for diff-lcs-1.1.2…  
> Building native extensions. This could take a while…  
> ERROR: Error installing dnssd:  
> 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
> 
> Gem files will remain installed in  
> /Library/Ruby/Gems/1.8/gems/dnssd-0.7.1 for inspection.  
> Results logged to  
> /Library/Ruby/Gems/1.8/gems/dnssd-0.7.1/ext/gem\_make.out  
> Successfully installed echoe-3.1.1

Well, you can install other Ruby. I followed this tutorial and it worked  
great:

[http://www.dcmanges.com/blog/install-multiple-versions-of-ruby-on-osx-leopard](http://www.dcmanges.com/blog/install-multiple-versions-of-ruby-on-osx-leopard)

The problem with header files were gone. But the problem with  
openssh.bundle I couldn’t solve.

---

<div class="post-metadata">

**Author:** ![hgtesta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/919ad9/32.png) [@hgtesta](https://www.ruby-forum.com/u/hgtesta)\
**Post date:** [July 31, 2009, 1:52am UTC](https://www.ruby-forum.com/t/problems-with-gems-and-ruby-1-8-7/172284/7 "2009-07-31T01:52:40Z")

</div>

On Jul 30, 2009, at 09:46, Ryan Wilson wrote:

> > > > (the installed version is 1.3.4), but the problem persist. Any  
> > > > snow  
> > > > /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

If this file really doesn’t exist you should submit a bug report to  
Apple.

---

<div class="post-metadata">

**Author:** ![hgtesta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/919ad9/32.png) [@hgtesta](https://www.ruby-forum.com/u/hgtesta)\
**Post date:** [August 13, 2009, 6:17pm UTC](https://www.ruby-forum.com/t/problems-with-gems-and-ruby-1-8-7/172284/8 "2009-08-13T18:17:58Z")

</div>

Installing the Xcode that’s bundled with the Snow Leopard developer seed  
fixed this problem for me.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![hgtesta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/919ad9/32.png) [@hgtesta](https://www.ruby-forum.com/u/hgtesta)\
**Post date:** [December 30, 2009, 2:10pm UTC](https://www.ruby-forum.com/t/problems-with-gems-and-ruby-1-8-7/172284/9 "2009-12-30T14:10:46Z")

</div>

Elliott Pogue wrote:

> Installing the Xcode that’s bundled with the Snow Leopard developer seed  
> fixed this problem for me.
> 
> Hope this helps.

Also worked for me 🙂 Thanks.

BR, Lasse

---

<div class="post-metadata">

**Author:** ![hgtesta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/919ad9/32.png) [@hgtesta](https://www.ruby-forum.com/u/hgtesta)\
**Post date:** [December 20, 2010, 3:49am UTC](https://www.ruby-forum.com/t/problems-with-gems-and-ruby-1-8-7/172284/10 "2010-12-20T03:49:21Z")

</div>

Just wanted to confirm that I had to do this same installation of xcode  
with a Macbook Pro purchased in December 2010.

---

<div class="post-metadata">

**Author:** ![hgtesta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/919ad9/32.png) [@hgtesta](https://www.ruby-forum.com/u/hgtesta)\
**Post date:** [January 11, 2010, 7:20am UTC](https://www.ruby-forum.com/t/problems-with-gems-and-ruby-1-8-7/172284/11 "2010-01-11T07:20:01Z")

</div>

Lasse B. wrote:

> Elliott Pogue wrote:
> 
> > Installing the Xcode that’s bundled with the Snow Leopard developer seed  
> > fixed this problem for me.
> > 
> > Hope this helps.
> 
> Also worked for me 🙂 Thanks.
> 
> BR, Lasse

Had the same problem, re-installed XCode with the Snow Leopard DVD we  
had here fixed it.

---

<div class="post-metadata">

**Author:** ![hgtesta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/919ad9/32.png) [@hgtesta](https://www.ruby-forum.com/u/hgtesta)\
**Post date:** [February 17, 2011, 5:59pm UTC](https://www.ruby-forum.com/t/problems-with-gems-and-ruby-1-8-7/172284/12 "2011-02-17T17:59:33Z")

</div>

And the beat goes on…

I just had to do the same thing for a new MacBook Pro purchased  
just a couple weeks ago. Good news is, this still works. Bad news is,  
it’s takes 9GB if you go whole hog and install xcode+iOS tools.

---

<div class="post-metadata">

**Author:** ![hgtesta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/919ad9/32.png) [@hgtesta](https://www.ruby-forum.com/u/hgtesta)\
**Post date:** [March 5, 2012, 1:26am UTC](https://www.ruby-forum.com/t/problems-with-gems-and-ruby-1-8-7/172284/13 "2012-03-05T01:26:00Z")

</div>

Hi All,  
I’m having the same problem when executing

$\> sudo gem install rails

I get the error:

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

I’m running 10.7.3 on a MacBook Air (11-inch Mid 2011 i5 CPU)

I have installed XCode v4.3 (latest) from the App Store (This computer  
has no DVD drive)

I know that the ruby.h file does exist because I find it with the locate  
command. It exists several places, like this:  
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Ruby.framework/Versions/1.8/Headers/ruby.h

Perhaps my gcc environment variables need to be updated?

Any advice is greatly appreciated.  
Thanks,  
Rob

---

<div class="post-metadata">

**Author:** ![hgtesta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/919ad9/32.png) [@hgtesta](https://www.ruby-forum.com/u/hgtesta)\
**Post date:** [April 21, 2011, 11:58am UTC](https://www.ruby-forum.com/t/problems-with-gems-and-ruby-1-8-7/172284/14 "2011-04-21T11:58:34Z")

</div>

Michael L. wrote in post #982264:

> Bad news is, it’s takes 9GB if you go whole hog and install xcode+iOS tools.

You don’t actually need the iOS tools which take up most of that space.

---

<div class="post-metadata">

**Author:** ![hgtesta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/919ad9/32.png) [@hgtesta](https://www.ruby-forum.com/u/hgtesta)\
**Post date:** [March 7, 2012, 9:32pm UTC](https://www.ruby-forum.com/t/problems-with-gems-and-ruby-1-8-7/172284/15 "2012-03-07T21:32:57Z")

</div>

Rob R. wrote in post #1050146:

> Hi All,  
> I’m having the same problem when executing
> 
> $\> sudo gem install rails
> 
> I get the error:
> 
> 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
> 
> I’m running 10.7.3 on a MacBook Air (11-inch Mid 2011 i5 CPU)
> 
> I have installed XCode v4.3 (latest) from the App Store (This computer  
> has no DVD drive)
> 
> I know that the ruby.h file does exist because I find it with the locate  
> command. It exists several places, like this:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Ruby.framework/Versions/1.8/Headers/ruby.h

> Perhaps my gcc environment variables need to be updated?
> 
> Any advice is greatly appreciated.  
> Thanks,  
> Rob

I had this particular problem as well and here’s how I got around it:  
For OS 10.7 + XCode4.3 only open Xcode preferences, select the  
“Downloads” button, select the “Components” tab of Downloads, highlight  
“Command Line Tools” and press the install button. Gem install rails  
didn’t give me any trouble after that. Hope that works for you too,

Chad

---

<div class="post-metadata">

**Author:** ![hgtesta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/919ad9/32.png) [@hgtesta](https://www.ruby-forum.com/u/hgtesta)\
**Post date:** [April 7, 2012, 5:06am UTC](https://www.ruby-forum.com/t/problems-with-gems-and-ruby-1-8-7/172284/16 "2012-04-07T05:06:53Z")

</div>

Chad Peterson wrote in post #1050618:

> I had this particular problem as well and here’s how I got around it:  
> For OS 10.7 + XCode4.3 only open Xcode preferences, select the  
> “Downloads” button, select the “Components” tab of Downloads, highlight  
> “Command Line Tools” and press the install button. Gem install rails  
> didn’t give me any trouble after that. Hope that works for you too,
> 
> Chad

This worked great. Thanks.

---

<div class="post-metadata">

**Author:** ![hgtesta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/919ad9/32.png) [@hgtesta](https://www.ruby-forum.com/u/hgtesta)\
**Post date:** [March 13, 2012, 7:29am UTC](https://www.ruby-forum.com/t/problems-with-gems-and-ruby-1-8-7/172284/17 "2012-03-13T07:29:30Z")

</div>

Hello…

yum install ruby-devel

solved it for me when installing rails

[waldyd@waldyd Homework 2]$ sudo gem install rails -V  
GET [http://rubygems.org/latest\_specs.4.8.gz](http://rubygems.org/latest_specs.4.8.gz)  
302 Found  
GET [http://production.s3.rubygems.org/latest\_specs.4.8.gz](http://production.s3.rubygems.org/latest_specs.4.8.gz)  
304 Not Modified  
GET [http://rubygems.org/specs.4.8.gz](http://rubygems.org/specs.4.8.gz)  
connection reset after 2 requests, retrying  
GET [http://rubygems.org/specs.4.8.gz](http://rubygems.org/specs.4.8.gz)  
302 Found  
GET [http://production.s3.rubygems.org/specs.4.8.gz](http://production.s3.rubygems.org/specs.4.8.gz)  
200 OK  
Installing gem json-1.6.5  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/.gitignore  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/.travis.yml  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/CHANGES  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/COPYING  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/COPYING-json-jruby  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/GPL  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/Gemfile  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/README-json-jruby.markdown  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/README.rdoc  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/Rakefile  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/TODO  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/VERSION  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/.keep  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkComparison.log  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator\_fast-autocorrelation.dat  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator\_fast.dat  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator\_pretty-autocorrelation.dat  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator\_pretty.dat  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator\_safe-autocorrelation.dat  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator\_safe.dat  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt.log  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator\_fast-autocorrelation.dat  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator\_fast.dat  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator\_pretty-autocorrelation.dat  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator\_pretty.dat  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator\_safe-autocorrelation.dat  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator\_safe.dat  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure.log  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator-autocorrelation.dat  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator.dat  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkComparison.log  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser-autocorrelation.dat  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser.dat  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser-autocorrelation.dat  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser.dat  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure.log  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser-autocorrelation.dat  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser.dat  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser-autocorrelation.dat  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser.dat  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/data/.keep  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/generator2\_benchmark.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/generator\_benchmark.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/ohai.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/ohai.ruby  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/parser2\_benchmark.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/benchmarks/parser\_benchmark.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/data/example.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/data/index.html  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/data/prototype.js  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/diagrams/.keep  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/ext/json/ext/fbuffer/fbuffer.h  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/ext/json/ext/generator/extconf.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/ext/json/ext/generator/generator.c  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/ext/json/ext/generator/generator.h  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/ext/json/ext/parser/extconf.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/ext/json/ext/parser/parser.c  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/ext/json/ext/parser/parser.h  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/ext/json/ext/parser/parser.rl  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/install.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/java/src/json/ext/ByteListTranscoder.java  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/java/src/json/ext/Generator.java  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/java/src/json/ext/GeneratorMethods.java  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/java/src/json/ext/GeneratorService.java  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/java/src/json/ext/GeneratorState.java  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/java/src/json/ext/OptionsReader.java  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/java/src/json/ext/Parser.java  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/java/src/json/ext/Parser.rl  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/java/src/json/ext/ParserService.java  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/java/src/json/ext/RuntimeInfo.java  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/java/src/json/ext/StringDecoder.java  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/java/src/json/ext/StringEncoder.java  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/java/src/json/ext/Utils.java  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/json-java.gemspec  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/json.gemspec  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/json\_pure.gemspec  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/lib/json.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/lib/json/add/bigdecimal.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/lib/json/add/complex.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/lib/json/add/core.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/lib/json/add/date.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/lib/json/add/date\_time.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/lib/json/add/exception.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/lib/json/add/ostruct.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/lib/json/add/range.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/lib/json/add/rational.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/lib/json/add/regexp.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/lib/json/add/struct.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/lib/json/add/symbol.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/lib/json/add/time.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/lib/json/common.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/lib/json/ext.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/lib/json/ext/.keep  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/lib/json/pure.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/lib/json/pure/generator.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/lib/json/pure/parser.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/lib/json/version.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail1.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail10.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail11.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail12.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail13.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail14.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail18.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail19.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail2.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail20.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail21.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail22.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail23.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail24.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail25.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail27.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail28.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail3.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail4.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail5.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail6.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail7.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail8.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/fail9.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/pass1.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/pass15.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/pass16.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/pass17.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/pass2.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/pass26.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/fixtures/pass3.json  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/setup\_variant.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/test\_json.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/test\_json\_addition.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/test\_json\_encoding.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/test\_json\_fixtures.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/test\_json\_generate.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/test\_json\_string\_matching.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/test\_json\_unicode.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tools/fuzz.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tools/server.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/test\_json\_string\_matching.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/test\_json\_fixtures.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/test\_json\_unicode.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/test\_json\_addition.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/test\_json\_generate.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/test\_json\_encoding.rb  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/tests/test\_json.rb  
Building native extensions. This could take a while…  
/usr/bin/ruby extconf.rb  
mkmf.rb can’t find header files for ruby at /usr/lib/ruby/ruby.h  
ERROR: Error installing rails:  
ERROR: Failed to build gem native extension.

```
    /usr/bin/ruby extconf.rb

```

mkmf.rb can’t find header files for ruby at /usr/lib/ruby/ruby.h

Gem files will remain installed in  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5 for inspection.  
Results logged to  
/usr/lib/ruby/gems/1.8/gems/json-1.6.5/ext/json/ext/parser/gem\_make.out

Best Regards,

Nestor Waldyd

---

<div class="post-metadata">

**Author:** ![hgtesta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/919ad9/32.png) [@hgtesta](https://www.ruby-forum.com/u/hgtesta)\
**Post date:** [May 17, 2012, 6:11am UTC](https://www.ruby-forum.com/t/problems-with-gems-and-ruby-1-8-7/172284/18 "2012-05-17T06:11:10Z")

</div>

> I had this particular problem as well and here’s how I got around it:  
> For OS 10.7 + XCode4.3 only open Xcode preferences, select the  
> “Downloads” button, select the “Components” tab of Downloads, highlight  
> “Command Line Tools” and press the install button. Gem install rails  
> didn’t give me any trouble after that. Hope that works for you too,
> 
> Chad

This worked for me using OS 10.7.4 + Xcode 4.3.2.

todgru

---

<div class="post-metadata">

**Author:** ![hgtesta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/919ad9/32.png) [@hgtesta](https://www.ruby-forum.com/u/hgtesta)\
**Post date:** [July 28, 2012, 9:32am UTC](https://www.ruby-forum.com/t/problems-with-gems-and-ruby-1-8-7/172284/19 "2012-07-28T09:32:20Z")

</div>

Posted by mark wiltshire (markemark) on 2012-07-17 18:39

> I had this particular problem as well and here’s how I got around it:  
> For OS 10.7 + XCode4.3 only open Xcode preferences, select the  
> “Downloads” button, select the “Components” tab of Downloads, highlight  
> “Command Line Tools” and press the install button. Gem install rails  
> didn’t give me any trouble after that. Hope that works for you too,

It did work for me thank you so much 🙂

---

<div class="post-metadata">

**Author:** ![hgtesta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/919ad9/32.png) [@hgtesta](https://www.ruby-forum.com/u/hgtesta)\
**Post date:** [July 17, 2012, 6:39pm UTC](https://www.ruby-forum.com/t/problems-with-gems-and-ruby-1-8-7/172284/20 "2012-07-17T18:39:16Z")

</div>

> I had this particular problem as well and here’s how I got around it:  
> For OS 10.7 + XCode4.3 only open Xcode preferences, select the  
> “Downloads” button, select the “Components” tab of Downloads, highlight  
> “Command Line Tools” and press the install button. Gem install rails  
> didn’t give me any trouble after that. Hope that works for you too,
> 
> Chad

This worked for me too Mac OS X 10.7.4 Xcode 4.3.3

Thanks

Mark

[Next page](https://www.ruby-forum.com/t/problems-with-gems-and-ruby-1-8-7/172284.md?page=2)
