gems screwed up, what now

9 views
Skip to first unread message

Mikhail Kovalev

unread,
Feb 28, 2008, 5:23:14 PM2/28/08
to Ruby on Rails: Talk
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 ? :(

Ilan Berci

unread,
Feb 28, 2008, 9:42:14 PM2/28/08
to rubyonra...@googlegroups.com
Mikhail Kovalev wrote:

>
> 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 ? :(

or..
d) read the error message more carefully..
it appears that your gem activeresource is the wrong version, you may
try
sudo gem update activeresource

although:
sudo gem update
should have picked up all dependencies by default...

I believe the --source and --system options are not needed for the
majority of cases..

If you keep plugging away at it, you will fix it... If you are ready to
go back to php after one slight hiccup then you should leave now as Ruby
is evolving very rapidly and tinkering at it is almost unavoidable..

hth

ilan
--
Posted via http://www.ruby-forum.com/.

heimdull

unread,
Feb 28, 2008, 11:10:44 PM2/28/08
to Ruby on Rails: Talk
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....

Mikhail Kovalev

unread,
Feb 29, 2008, 6:10:38 AM2/29/08
to Ruby on Rails: Talk
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

Mikhail Kovalev

unread,
Feb 29, 2008, 6:34:00 AM2/29/08
to Ruby on Rails: Talk
False alarm, this fixed the problem

sudo port selfupdate
sudo port uninstall rb-rubygems
sudo port install rb-rubygems
Reply all
Reply to author
Forward
0 new messages