I start with Mac OS X Leopard 10.5.2 with Rails 1.2.6 pre-installed:
cm-84:~ mikhailkovalev$ ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [universal-darwin9.0]
Works perfectly. I read a tip on http://www.rubyonrails.org/down on
how to update Rails with gems:
cm-84:~ mikhailkovalev$ sudo gem update rails
Password:
Updating installed gems...
Attempting remote update of rails
Successfully installed rails-2.0.2
1 gem installed
Gems updated: rails
cm-84:~ mikhailkovalev$ rails -v
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/rubygems.rb:379:in `report_activate_error': RubyGem version error:
activesupport(1.4.2 not = 2.0.2) (Gem::LoadError)
.....(further errors)
Very well, I search google and update gems, activesupport and
whatever:
cm-84:~ mikhailkovalev$ sudo gem update --system
cm-84:~ mikhailkovalev$ sudo gem update --source http://gems.rubyonrails.org
The second line happens with some minor errors. Now:
cm-84:~ mikhailkovalev$ rails
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/rubygems.rb:379:in `report_activate_error': Could not find RubyGem
activeresource (= 2.0.2) (Gem::LoadError)
.....
I want to
a) purge everything and do a clean re-install
b) is there a way out of this
c) back to php and see you in 2 years ?
lets start with:
~$ gem list
you should have something like this:
actionmailer (2.0.2, 1.3.6, 1.3.3)
actionpack (2.0.2, 1.13.6, 1.13.3)
actionwebservice (1.2.6, 1.2.3)
activerecord (2.0.2, 1.15.6, 1.15.3)
activeresource (2.0.2)
activesupport (2.0.2, 1.4.4, 1.4.2)
rails (2.0.2, 1.2.6, 1.2.3)
+plus more...
Like mr Berci said if you look at the error you are missing
activesupport 2.0.2 try
~$ sudo gem install activesource -v=2.0.2
you could also just do:
~$ sudo remove all the active* and rails then
~$ sudo install rails
that should bring you back to square one...
FYI
~$ sudo gem update --system updates the gem system files
~$ sudo gem update updates the gems them self
to check for updates for the gems use
~$ sudo gem outdated
Hope this helps and welcome to the club....
I deleted everything with
sudo rm -r /System/Library/Frameworks/Ruby.framework/
sudo rm -r /Library/Ruby
sudo rm /usr/bin/ruby
sudo rm /usr/bin/gem
And installed gem from scratch with macports
sudo port install rb-rubygems
Took almost an hour. Now trying to update with:
sudo gem update --system
cm-84:~ mikhailkovalev$ sudo gem update --system
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load -- sources (LoadError)
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:
27:in `require'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/
source_info_cache.rb:6
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:
27:in `gem_original_require'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:
27:in `require'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/remote_installer.rb:
12
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:
27:in `gem_original_require'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:
27:in `require'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:112:in
`manage_gems'
from /opt/local/bin/gem:10
False alarm, this fixed the problem
sudo port selfupdate
sudo port uninstall rb-rubygems
sudo port install rb-rubygems