[Rubygems-developers] [ rubygems-Bugs-27705 ] Gem installer places a mis-named *.rb file in /usr/local/lib

noreply at rubyforge.org noreply at rubyforge.org
Tue Jan 19 23:18:18 EST 2010


Bugs item #27705, was opened at 2010-01-19 15:52
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=27705&group_id=126

Category: RubyGems installer (setup.rb)
Group: None
>Status: Closed
>Resolution: Rejected
Priority: 3
Submitted By: Forrest  Aldrich (forrie)
Assigned to: Nobody (None)
Summary: Gem installer places a mis-named *.rb file in /usr/local/lib

Initial Comment:

I have been having some trouble installing rubygems on a new system.  The following error I encountered:

# gem
/usr/local/bin/gem:8:in `require': no such file to load -- rubygems (LoadError)
        from /usr/local/bin/gem:8

After looking around, I found this under /usr/local/lib:

-rw-r--r-- 1 root root   29096 Jan 19 18:32 rubygems.rb
-rw-r--r-- 1 root root     268 Jan 19 18:32 ubygems.rb

the second file should not be there and I have no idea how was created.  Removing the obviously misnamed-file solved the problem.

The command I used to install:

ruby setup.rb --prefix=/usr/local

This applies to the latest version of rubygems-1.3.5 on RHEL 5.4.









----------------------------------------------------------------------

>Comment By: Ryan Davis (zenspider)
Date: 2010-01-19 20:18

Message:
The file isn't misnamed and it was not the cause of your problems.

It is there so you can use the '-r' flag like so:

% ruby -rubygems blah.rb

instead of:

% ruby -rrubygems blah.rb

(which you can still do, obviously).

(It would have been obvious had you read the file)

Further, you shouldn't be specifying --prefix to setup.rb. I think this is your real problem. You shouldn't have ruby files under /usr/local/lib. You should have them under /usr/local/lib/ruby/site_ruby/1.8 or some-such. Don't specify anything and let ruby figure out where the files should go. You should remove all the .rb files installed under /usr/local/lib.



----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=27705&group_id=126


More information about the Rubygems-developers mailing list