While trying to figure out how to install gems 1.4.2 in Ubuntu 10.4 with Ruby 1.9.2 I found the following error:
root@DMX82877:/usr/src/rubygems-1.4.2# ruby setup.rb --setup /usr/src/rubygems-1.4.2/lib/rubygems/source_index.rb:62:in `installed_spec_directories': undefined method `path' for Gem:Module (NoMethodError) from /usr/src/rubygems-1.4.2/lib/rubygems/source_index.rb:52:in `from_installed_gems' from /usr/src/rubygems-1.4.2/lib/rubygems.rb:914:in `source_index' from /usr/src/rubygems-1.4.2/lib/rubygems/gem_path_searcher.rb:83:in `init_gemspecs' from /usr/src/rubygems-1.4.2/lib/rubygems/gem_path_searcher.rb:13:in `initialize' from /usr/src/rubygems-1.4.2/lib/rubygems.rb:873:in `new' from /usr/src/rubygems-1.4.2/lib/rubygems.rb:873:in `searcher' from /usr/src/rubygems-1.4.2/lib/rubygems.rb:495:in `find_files' from /usr/src/rubygems-1.4.2/lib/rubygems.rb:1034:in `load_plugins' from /usr/src/rubygems-1.4.2/lib/rubygems/gem_runner.rb:84:in `<top (required)>' from <internal:lib/rubygems/custom_require>:29:in `require' from <internal:lib/rubygems/custom_require>:29:in `require' from setup.rb:25:in `<main>'.
Making google research I found this is kind of a known issue, but until now there’s not a real workaround of this. So what I did, it’s making flat installation of ruby 1.8.7, then install gems 1.4.2 and at the end rails 3.0.3 and it worked just right!
cd ruby-1.8.7-p330/ ./configure make make install cd rubygems-1.4.2 ruby setup.rb gem install -r rails
References:
http://railsforum.com/viewtopic.php?id=42374
Advertisement