I am new to Rails and attempting to upgrade Rails on my Mac to latest
version so that I can follow the rails tutorial, but I just can’t seem
to get anywhere.
When I attempt to update rails with: $ sudo gem update rails -y, I
receive the following error.
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
Any ideas what I am doing wrong, or what I can do to upgrade to rails?
Ruby Version is:1.8.7, patchlevel 174
Rails current version is: 2.3.5
Many thanks in advance…
====
Here is the full output when running…
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…