Rubygems Weirdness

Hi,

I’ve been experiencing some strange behavior with rubygems.

Background:

Solaris 10 x86
ruby 1.8.4
rubygems-0.9.2

I dont’ have access to the default rubygems repository, so I’m trying to
set one up in my user dir. I know about the poisoned gem index thing and
I’ve removed all the old cache files… so I’m pretty sure that’s not
where the problem lies. Anyway, I setup my GEM_HOME environment
variable, downloaded rubygems 0.9.2 and installed it in my home
directory using:

|$ ruby setup.rb config --prefix=/path/to/my/home
$ ruby setup.rb setup
$ ruby setup.rb install

Here's where it gets weird. At the end of the installation, it tells me:

Successfully built RubyGem
Name: sources
Version: 0.0.1
File: sources-0.0.1.gem
Removing old RubyGems RDoc and ri…
Installing rubygems-0.8.11 ri…
Installing rubygems-0.8.11 rdoc…

As of RubyGems 0.8.0, library stubs are no longer needed.
Searching $LOAD_PATH for stubs to optionally delete (may take a
while)…
…done.
No library stubs found.

What??? 0.8.11

Ok, so then I run [gem update --system] and I get:

Upgrading RubyGems... Attempting remote upgrade of rubygems-update Attempting remote installation of 'rubygems-update' Successfully installed rubygems-update-0.9.2 Updating version of RubyGems to 0.9.2 Installing RubyGems 0.9.2 ---> bin <--- bin ---> lib ---> lib/rbconfig <--- lib/rbconfig ---> lib/rubygems <--- lib/rubygems <--- lib ---> bin <--- bin ---> lib ---> lib/rbconfig <--- lib/rbconfig ---> lib/rubygems <--- lib/rubygems <--- lib rm -f InstalledFiles ---> bin mkdir -p /opt/csw/bin/ install gem /opt/csw/bin/ setup.rb:466:in `chmod': Not owner - /opt/csw/bin/gem (Errno::EPERM) from setup.rb:466:in `rm_f' from setup.rb:513:in `install' from setup.rb:1093:in `verbose_off' from setup.rb:512:in `install' from setup.rb:1200:in `install_files' from setup.rb:1199:in `install_files' from setup.rb:1179:in `install_dir_bin' from setup.rb:1328:in `traverse' from setup.rb:1345:in `dive_into' from setup.rb:1326:in `traverse' from setup.rb:1320:in `exec_task_traverse' from setup.rb:1315:in `exec_task_traverse' from setup.rb:1175:in `exec_install' from setup.rb:894:in `exec_install' from setup.rb:712:in `invoke' from setup.rb:681:in `invoke' from setup.rb:1359 RubyGems system software updated

Ok, this is bizarre. It’s trying to update the system wide version of
rubygems?

What if I try running [/path/to/my/home/bin/gem update --system] ???
Same results as above.

My GEM_HOME environment variable is set so???

running [gem env] shows me that my gem environment seems to be ok:

  • VERSION: 0.8.11 (0.8.11)
  • INSTALLATION DIRECTORY: /path/to/my/home/lib/ruby/gems
  • GEM PATH:
    • /path/to/my/home/lib/ruby/gems
  • REMOTE SOURCES:

I really need some help with this as I have no idea why rubygems are
behaving this way.

Regards,
Steven

|

On Feb 28, 2007, at 11:52, Steven H. wrote:

Ok, I figured out the problem, I just had to setup an environment
variable:

RUBYLIB=:/path/to/my/home/lib/ruby/site_ruby/1.8

That fixed it.

Oddly enough, I don’t see this information anywhere on the rubygems
manual page:
http://rubygems.org/read/chapter/3#page83

Can you file a bug in the RubyGems tracker? Otherwise nobody will
remember to fix it.

I’ve been experiencing some strange behavior with rubygems.

that’s not where the problem lies. Anyway, I setup my GEM_HOME
environment variable, downloaded rubygems 0.9.2 and installed it in my
home directory using:

|$ ruby setup.rb config --prefix=/path/to/my/home
$ ruby setup.rb setup
$ ruby setup.rb install

Ok, I figured out the problem, I just had to setup an environment
variable:

RUBYLIB=:/path/to/my/home/lib/ruby/site_ruby/1.8

That fixed it.

Oddly enough, I don’t see this information anywhere on the rubygems
manual page:
http://rubygems.org/read/chapter/3#page83