Solved

Can't update rails - requires RubyGems version >= 1.3.6

Posted on 2011-09-02
11
3,583 Views
Last Modified: 2012-05-12
I am trying to update rails.

I'm running: $ sudo gem update rails -y

but get the following response:


iMac:blog jason$ sudo gem update rails -y
Password:
Updating installed gems
Updating rails
ERROR:  Error installing rails:
      multi_json requires RubyGems version >= 1.3.6
Nothing to update


How do I update RubyGems to 1.3.6?  

Thanks in advance!

Jason
0
Comment
Question by:Jay1607
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
11 Comments
 

Author Comment

by:Jay1607
ID: 36473461
OK.. Updated RubyGems to latest version, but now when I run: $ sudo gem update rails -y .. I get ..

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

See full output attached

iMac:blog jason$ sudo gem update rails -y
Updating installed gems
Updating rails
Fetching: activesupport-3.1.0.gem (100%)
Fetching: builder-3.0.0.gem (100%)
Fetching: i18n-0.6.0.gem (100%)
Fetching: bcrypt-ruby-3.0.0.gem (100%)
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


Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/bcrypt-ruby-3.0.0 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/bcrypt-ruby-3.0.0/ext/mri/gem_make.out
Gems updated: multi_json, activesupport, builder, i18n
Installing ri documentation for multi_json-1.0.3...
Installing ri documentation for activesupport-3.1.0...
Installing ri documentation for builder-3.0.0...
Installing ri documentation for i18n-0.6.0...
Installing RDoc documentation for multi_json-1.0.3...
Installing RDoc documentation for activesupport-3.1.0...
Installing RDoc documentation for builder-3.0.0...
Installing RDoc documentation for i18n-0.6.0...

Open in new window

0
 
LVL 12

Expert Comment

by:JESii
ID: 36474863
Try
  sudo gem update --ssytem
this should get you the latest version of rubygems and then you can try updating rails again.
0
 
LVL 12

Expert Comment

by:JESii
ID: 36474871
Sorry... misspelling; should be
  sudo gem update --system
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Jay1607
ID: 36477639
Thanks JESii.. yes I ran that and have the latest version of rubyGems, but when I try to update rails with  $ sudo gem update rails -y, I get the output above (in my second post above), and rails has not updated.. as per output above I am getting

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

Accepted Solution

by:
JESii earned 500 total points
ID: 36485293
Here's the key message:
   mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h

Do you have the latest Mac DevCode installed? That's on your Mac OSx CD
0
 

Author Comment

by:Jay1607
ID: 36486158
Thanks JESii.. how do I tell which version Mac Devcode I have installed?  Can I get that from the web anywhere? (A google search didn't return anything useful).

Thanks
0
 
LVL 12

Expert Comment

by:JESii
ID: 36486507
That I don't know; but I'm pretty sure that you can just insert your Mac OSx DVD, pick the DevCode option, and just install it again (I can't remember... it might have some other name than "DevCode" - maybe DevTools? - but it'll be plain to see cause it's the only "Dev" option on the install disk).
0
 

Author Comment

by:Jay1607
ID: 36488034
I have 2 CDs that came with the mac.

One is the install, and the other is Applications.. there is nothing on either of them called DevCode, or Mac Dev or anything like that.  Only thing related to dev is xcode..  is xcode what you mean?
0
 
LVL 12

Expert Comment

by:JESii
ID: 36488797
My apologies; yes, that's the one.
0
 
LVL 31

Expert Comment

by:James Murrell
ID: 36929385
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I recently rediscovered rails when I needed a holiday project and decided to build a management dashboard for the company where I work.  With it being a project done in my free time, I could focus my time on learning the basics rather than trying to…
Article by: narshlob
If you've ever programmed in Ruby and have come across either a proc or a lambda, you might have been wondering what the difference is between the two and when you would use one over the other. This article will try to explain the difference between…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question