# Rubygems Weirdness

**URL:** <https://www.ruby-forum.com/t/rubygems-weirdness/87196>\
**Category:** Ruby\
**Created:** [February 28, 2007, 8:23pm UTC](https://www.ruby-forum.com/t/rubygems-weirdness/87196 "2007-02-28T20:23:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rooster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/71c47a/32.png) [@rooster](https://www.ruby-forum.com/u/rooster)\
**Post date:** [February 28, 2007, 8:23pm UTC](https://www.ruby-forum.com/t/rubygems-weirdness/87196/1 "2007-02-28T20:23:51Z")

</div>

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:
  - [http://gems.rubyforge.org](http://gems.rubyforge.org)

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

Regards,  
Steven

|

---

<div class="post-metadata">

**Author:** ![rooster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/71c47a/32.png) [@rooster](https://www.ruby-forum.com/u/rooster)\
**Post date:** [March 1, 2007, 1:24am UTC](https://www.ruby-forum.com/t/rubygems-weirdness/87196/2 "2007-03-01T01:24:49Z")

</div>

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](http://rubygems.org/read/chapter/3#page83)

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

---

<div class="post-metadata">

**Author:** ![rooster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/71c47a/32.png) [@rooster](https://www.ruby-forum.com/u/rooster)\
**Post date:** [February 28, 2007, 8:52pm UTC](https://www.ruby-forum.com/t/rubygems-weirdness/87196/3 "2007-02-28T20:52:56Z")

</div>

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](http://rubygems.org/read/chapter/3#page83)
