Ruby 1.8.7 with gems 1.4.2 in Ubuntu 10.4

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

One thought on “Ruby 1.8.7 with gems 1.4.2 in Ubuntu 10.4

  1. naturally like your web-site but you need to take
    a look at the spelling on quite a few of your posts.
    A number of them are rife with spelling issues and I in finding it very bothersome
    to tell the reality however I will certainly come back again.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s