Error on manual install of GEM using Ruby 192p136 + Ubuntu 10.10

root@ubuntu-VirtualBox:/home/adminuser/Desktop/rubygems-1.4.0# ruby -v
ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-linux]
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 method `path' 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:in
`source_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:in
`initialize'
  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:in
`searcher'
  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:in
`load_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:in `require'
  from <internal:lib/rubygems/custom_require>:29:in `require'
  from ./setup.rb:25:in `<main>'

Trying to understand why I get this error. I tried to follow
instructions at :
http://www.hackido.com/2010/12/install-ruby-on-rails-on-ubuntu.html

More clues:

root@ubuntu-VirtualBox:/home/adminuser/Desktop/rubygems-1.4.0# rvm
package install zlib
Fetching zlib-1.2.5.tar.gz to /usr/local/rvm/archives
Extracting zlib-1.2.5.tar.gz to /usr/local/rvm/src
Configuring zlib in /usr/local/rvm/src/zlib-1.2.5.
Compiling zlib in /usr/local/rvm/src/zlib-1.2.5.
Installing zlib to /usr/local/rvm/usr

I got around this by re-installing my Ubuntu and then installing the
Ruby that comes with the disto, which is labeled as 1.9.1 but actually
seems to be 1.9.2 , which is the confusion that actually started me
down the whole manual install/setup path....

So, there is definitely an issue (explained in this thread) but I am
able to work around it...

-jon

Jon W. wrote in post #971729:

Before installing1.9.2 did you install zlib?

sudo rvm package install zlib

Also, note that you don't do gem installs when running rvm, instead you
use rvmsudo gem install

Vince W. wrote in post #971862:

Before installing1.9.2 did you install zlib?

sudo rvm package install zlib

Also, note that you don't do gem installs when running rvm, instead you
use rvmsudo gem install

yes, I tried various ways of installing "zlib" as a system library. I
tried rvm, non-rvm normal gem install, and also synaptic package
manager. it didn't help.