Problem with updating rails
I am running Tiger and (stupidly) decided to upgrade Rails from 1.1.6 to 1.2.6. I ran the command "sudo gem install rails -include-dependencies" and everything seemed to be fine. However, after installation, when I ran the "rails -v" command, I got the errors shown below. Could it be that 1.2.6 is not Tiger compatible? I have searched the internet for compatibility information but found nothing. By the way, in desperation I tried to go back to 1.1.6, but I still have the same errors and now I will be neat and tidy. Can anyone please help? Thanks.
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:55: uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support.rb:56
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record.rb:25
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:229:in `activate'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:228:in `each'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:228:in `activate'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:214:in `activate'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:213:in `each'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:213:in `activate'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:66:in `active_gem_with_options'
from /usr/local/lib/ruby/site
What you did looks like you were jumping straight onto the rails 2.3.2.
Now, I would suggest you update everything first:
sudo gem update --system
sudo gem update
And then install version 1.2.6. You will now have versions 1.1.6, 1.2.6 and 2.3.2
sudo gem install rails -v1.2.6
And by the way, what's the ruby version you have and are you using the one supplied by Apple? In particular, if you have executed the following two commands, you will get the information you need. (which will definitely be different from mine)
$ ruby --version
ruby 1.8.7 (2009-04-08 patchlevel 160) [i686-darwin9]
$ which ruby
/opt/local/bin/ruby
And no, there is no incompatibility with the Tiger.
a source to share
I got this error when I was (blindly) following the OS X RoR installation instructions from HiveLogic . You expect them to be okay because Apple contacts them. HOWEVER , the binary paths included in this document are deprecated !!!
Specifically, RubyGems were 0.9 instead of 1.3. The other binaries in the list are deprecated with dead links.
To fix the issue, follow the current directions from Ruby on Rails . You will download and install the correct version of RubyGems and good luck!
If you follow HiveLogic's directions, you can check ALL your versions.
a source to share
You specify the desired Gem version by setting the RAILS_GEM_VERSION constant at the top of config / environment.rb, for example.
RAILS_GEM_VERSION = '2.3.2'
OR you can freeze Rails in vendor / rails. When Rails is loaded from your application, it will first look in the vendor / rails so you can freeze the version you want. But I prefer the RAILS_GEM_VERSION approach.
a source to share