Ruby on Rails download page misleading instructions: Ruby 1.9.2p0 + RubyGems = error

Attempting to install RubyGems onto Ruby 1.9.2 (in my case - installer
for Windows) as the RoR download page suggests causes the following
very non-informative error:

source_index.rb:68:in installed_spec_directories': undefined methodpath’ for Gem:Module (NoMethodError)

Apparently Ruby 1.9.2 (at least the installer for Windows) comes with
RubyGems bundled. Just FYI for RoR webmasters & fellow newbies such as
myself that don’t keep track of Ruby’s new features.

Yuval

I get the exact same error using Ubuntu 10.10 with Ruby 1.9.2p136 . I
am thrown for a loop on this one. What is wrong?

root@ubuntu-VirtualBox:/home/adminuser/Desktop/rubygems-1.4.0# ruby
./setup.rb
/home/adminuser/Desktop/rubygems-1.4.0/lib/rubygems/source_index.rb:62:in
installed_spec_directories': undefined methodpath’ for Gem:Module
(NoMethodError)
from
/home/adminuser/Desktop/rubygems-1.4.0/lib/rubygems/source_index.rb:52:in
from_installed_gems' from /home/adminuser/Desktop/rubygems-1.4.0/lib/rubygems.rb:914:insource_index’
from
/home/adminuser/Desktop/rubygems-1.4.0/lib/rubygems/gem_path_searcher.rb:98:in
init_gemspecs' from /home/adminuser/Desktop/rubygems-1.4.0/lib/rubygems/gem_path_searcher.rb:13:ininitialize’
from /home/adminuser/Desktop/rubygems-1.4.0/lib/rubygems.rb:873:in
new' from /home/adminuser/Desktop/rubygems-1.4.0/lib/rubygems.rb:873:insearcher’
from /home/adminuser/Desktop/rubygems-1.4.0/lib/rubygems.rb:495:in
find_files' from /home/adminuser/Desktop/rubygems-1.4.0/lib/rubygems.rb:1034:inload_plugins’
from
/home/adminuser/Desktop/rubygems-1.4.0/lib/rubygems/gem_runner.rb:84:in
<top (required)>' from <internal:lib/rubygems/custom_require>:29:inrequire’
from internal:lib/rubygems/custom_require:29:in require' from ./setup.rb:25:in
root@ubuntu-VirtualBox:/home/adminuser/Desktop/rubygems-1.4.0# ruby -v
ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-linux]

I get a error using Ubuntu 10.10 with Ruby 1.9.2p136 and trying to
manually install the GEM package. I am thrown for a loop on this one.
What is wrong?


root@ubuntu-VirtualBox:/home/adminuser/Desktop/rubygems-1.4.0# ruby
./setup.rb
/home/adminuser/Desktop/rubygems-1.4.0/lib/rubygems/source_index.rb:62:in
installed_spec_directories': undefined methodpath’ for Gem:Module
(NoMethodError)
from
/home/adminuser/Desktop/rubygems-1.4.0/lib/rubygems/source_index.rb:52:in
from_installed_gems' from /home/adminuser/Desktop/rubygems-1.4.0/lib/rubygems.rb:914:insource_index’
from
/home/adminuser/Desktop/rubygems-1.4.0/lib/rubygems/gem_path_searcher.rb:98:in
init_gemspecs' from /home/adminuser/Desktop/rubygems-1.4.0/lib/rubygems/gem_path_searcher.rb:13:ininitialize’
from /home/adminuser/Desktop/rubygems-1.4.0/lib/rubygems.rb:873:in
new' from /home/adminuser/Desktop/rubygems-1.4.0/lib/rubygems.rb:873:insearcher’
from /home/adminuser/Desktop/rubygems-1.4.0/lib/rubygems.rb:495:in
find_files' from /home/adminuser/Desktop/rubygems-1.4.0/lib/rubygems.rb:1034:inload_plugins’
from
/home/adminuser/Desktop/rubygems-1.4.0/lib/rubygems/gem_runner.rb:84:in
<top (required)>' from <internal:lib/rubygems/custom_require>:29:inrequire’
from internal:lib/rubygems/custom_require:29:in require' from ./setup.rb:25:in
root@ubuntu-VirtualBox:/home/adminuser/Desktop/rubygems-1.4.0# ruby -v
ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-linux]

Thanks for the info on gem-prelude. I already suspected that 1.4 might
have an issue and so I also tried a manual install of GEM 1.36 but I had
the exact same issue. So, I doubt that this is an issue only concerning
1.4 … Any further ideas?

-jon

Frederick C. wrote in post #971797:

On Jan 1, 12:00am, “Jon W.” [email protected] wrote:

I get a error using Ubuntu 10.10 with Ruby 1.9.2p136 and trying to
manually install the GEM package. I am thrown for a loop on this one.
What is wrong?

Well ruby 1.9 comes with a version of rubygems builtin and the docs
for rubygems 1.4 say “NOTE: Ruby 1.9 ships with rubygems and contains
a very buggy “gem-prelude”. It is a gem loading system that can
interfere with updating rubygems itself. We do NOT recommend you
update to rubygems 1.4 if you’re running ruby 1.9.x until we get that
sorted out in a future ruby release”

Fred

On Jan 1, 12:00am, “Jon W.” [email protected] wrote:

I get a error using Ubuntu 10.10 with Ruby 1.9.2p136 and trying to
manually install the GEM package. I am thrown for a loop on this one.
What is wrong?

Well ruby 1.9 comes with a version of rubygems builtin and the docs
for rubygems 1.4 say “NOTE: Ruby 1.9 ships with rubygems and contains
a very buggy “gem-prelude”. It is a gem loading system that can
interfere with updating rubygems itself. We do NOT recommend you
update to rubygems 1.4 if you’re running ruby 1.9.x until we get that
sorted out in a future ruby release”

Fred

On Jan 1, 11:46pm, “Jon W.” [email protected] wrote:

Thanks for the info on gem-prelude. I already suspected that 1.4 might
have an issue and so I also tried a manual install of GEM 1.36 but I had
the exact same issue. So, I doubt that this is an issue only concerning
1.4 … Any further ideas?

You don’t need that because rubygems 1.3.7 because that is part of
ruby 1.9.2

Fred

Thank you. I was able to workaround it by installing the “Ruby 1.9.1”
package on Ubuntu, which is actually Ruby 1.9.2, to my surprise. I
wasn’t able to get through the manual install but Ubuntus packages are
working for me. Thanks.

-jon

Frederick C. wrote in post #971863:

On Jan 1, 11:46pm, “Jon W.” [email protected] wrote:

Thanks for the info on gem-prelude. I already suspected that 1.4 might
have an issue and so I also tried a manual install of GEM 1.36 but I had
the exact same issue. So, I doubt that this is an issue only concerning
1.4 … Any further ideas?

You don’t need that because rubygems 1.3.7 because that is part of
ruby 1.9.2

Fred