Solved

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

Posted on 2011-09-02
11
3,572 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
  • 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
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.

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Recently I spent hours debugging an issue in a Rails project where ActiveRecord was causing MySQL errors trying to create a User object of a class at the top level of a Single Table Inheritance model structure.  It turns out `.create` behaves differ…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

820 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