Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 239005 - Building dev-ruby/facter fails with "/usr/bin/ruby: no such file to load -- auto_gem (LoadError)" when RUBYOPT="-rauto_gem"
Summary: Building dev-ruby/facter fails with "/usr/bin/ruby: no such file to load -- a...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: MATSUU Takuto (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-29 07:23 UTC by Gunnar Wrobel (RETIRED)
Modified: 2008-09-30 03:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gunnar Wrobel (RETIRED) gentoo-dev 2008-09-29 07:23:19 UTC
Installing facter without having rubygems installed fails with:

>>> Install facter-1.3.8 into /var/tmp/portage/dev-ruby/facter-1.3.8/image/ category dev-ruby
/usr/bin/ruby: no such file to load -- auto_gem (LoadError)
 * 
 * ERROR: dev-ruby/facter-1.3.8 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_install
 *             environment, line 2219:  Called ruby_einstall
 *             environment, line 2125:  Called die
 * The specific snippet of code:
 *           ${RUBY} install.rb config --prefix=${D}/usr "$@" ${RUBY_ECONF} || die "install.rb config failed";
 *  The die message:
 *   install.rb config failed

Emerging dev-ruby/rubygems fixes the problem.
Comment 1 MATSUU Takuto (RETIRED) gentoo-dev 2008-09-29 16:04:08 UTC
hmm, on my env (~amd64, ruby-1.8.6_p287-r1), it installs successful without rubygems.
Could you put your emerge --info here? and what version of ruby do you use?
Comment 2 Gunnar Wrobel (RETIRED) gentoo-dev 2008-09-30 03:50:41 UTC
Thanks for the feedback. In fact I'm using the ruby version. I did check again now and it is indeed not dependant on dev-ruby/rubygems. I don't know exactly why emerging that package helped.

The problem is apparently rather linked to the RUBYOPTS variable. I found the same problem mentioned here:

http://fatpenguinblog.com/scott-rippee/usrbinruby-no-such-file-to-load-auto_gem-loaderror/

This is the value of RUBYOPT on my system:

> echo $RUBYOPT                                                                                                                                                            
-rauto_gem

Using 

RUBYOPT="" emerge facter

indeed corrects the problem.

I mark this as invalid now though maybe it still has some relevance in the ruby world of Gentoo.

I don't know why RUBYOPT had that value. I emerged ruby and facter from binary packages in a fresh untarred stage.