about img
blogger img

buchos posts img

scotts posts image

UnderPaidLoveMonkis posts img

Corys posts image


/usr/bin/ruby: no such file to load — auto_gem (LoadError)

Scott Rippee @ 8:46 pm December 17th, 2006

Gentoo decided to throw me a hurdle when trying to `emerge rubygems` tonight:

CODE:
  1. >>> Install rubygems-0.8.11-r5 into /var/tmp/portage/rubygems-0.8.11-r5/image/ category dev-ruby
  2. /usr/bin/ruby: no such file to load -- auto_gem (LoadError)
  3. /usr/bin/ruby: no such file to load -- auto_gem (LoadError)
  4.  
  5. !!! ERROR: dev-ruby/rubygems-0.8.11-r5 failed.
  6. !!! Function ruby_einstall, Line 125, Exitcode 1
  7. !!! setup.rb config failed
  8. !!! If you need support, post the topmost build error, NOT this status message.

The solution is to clear the RUBYOPT variable:

CODE:
  1. RUBYOPT="" emerge rubygems

14 Responses to “/usr/bin/ruby: no such file to load — auto_gem (LoadError)”

  1. Nolan Eakins Says:

    And this does what?

  2. Marton Sari Says:

    Thanks very much.

  3. Daevid Vincent Says:

    Thank you! This was driving me nuts, and http://bugs.gentoo.org didn't show anything for rubygems that I found.

  4. Henrik Says:

    This helped me repairing my ruby install... big time. Thank you!

  5. Ryan Says:

    Thanks! Exactly what I was looking for. I couldn't get ruby 1.9 to run on gentoo.

  6. Davi Says:

    Thank you very much.

    It solved my problem with Ruby Enterprise Edition + Gentoo.

  7. Vetal4eg Says:

    Nice! thx u!

  8. porcelinux Says:

    yesss,
    this solved my errors in amarok 1.4

    Tnx a lot master

  9. marc Says:

    thanks, this was exactly what i've searched for. here we go REE :)

  10. Rod McLaughlin Says:

    Cheers. We have to use Gentoo at work (it's either that or Windows!) and I've realised that when I 'emerge' (install) anything, it might just update Rubygems in the background, breaking it. The sysadmin guys all say Gentoo is the dog's bollocks, but I can't quite understand why. There isn't an 'ebuild' for Rails 2.3.9, for example, so we have to upgrade every app to Rails 2.3.10 before delivering it into production.

  11. BAReFOOt Says:

    @Rod: The only generalization that can be made, is that people who generalize, can in general not be taken seriously. (And because that includes this instance, there are exceptions to this rule too, making it a valid rule. … Or circular reasoning … I can’t decide … ;)

    Don’t just run emerge like that. Run it with -atv (ask, tree view, and verbose). That way it shows you a nice tree of dependencies it installs, and asks you politely before going ahead. ^^
    And for updates, this is the result of 8 years of Gentoo experience:
    1. eix-sync (Requires /etc/eix-sync.conf to be set up like shown below.)
    2. emerge -auDNtv --changed-use --keep-going world
    3. Run any language-specific updaters. (Like haskell-updater or python-updater)
    4. emerge -1 @preserved-rebuild && revdep-rebuild && emerge -a --depclean && etc-update # @preserved-rebuild requires Portage 2.2, so unmask it.

    If there are any problems, you may have to go back to step 2 again, after fixing them. (Don’t worry, it will go much faster the second time.)

    The /etc/eix-sync.conf:
    # Order according to the script: (“*” replaced by “!layman -S”.)
    !layman -S || echo "Continuing, despite errors in Layman."
    # emerge --sync gets executed here
    @egencache --repo=local --update # Only if you use your local portage overlay
    #@cd /var/lib/layman/kde/Documentation && sh ./metadata-sync # Only if you use the kde overlay
    @emerge --regen || echo "“emerge --regen” returned error status $?."
    # #emerge --metadata (Not active because of FEATURES="metadata-transfer" being on and required by overlays that modify eclasses.)
    # eix-update gets executed here, if eix-cache isn’t newer than tmpfile
    @@eix-remote update
    # eix-diff gets executed here

  12. Rod McLaughlin Says:

    Barefoot - thanks for your reply, exactly 13 months after my post. In the meantime, I've become a Gentoo geek. I now know why Gentoo is the number one distro of Linux for robust delivery of server systems. I've written several ebuilds, complete build scripts for servers using the Gentoo 'emerge' package manager, which is the best in the business.

  13. ☈king Says:

    Here's a paste of what I learned about this situation:

    "don't emerge anything from dev-ruby
    and be quiet
    or, use our interpreter, and packages and things will work as well
    in between, things are not so cosy "

    In other words, they do not plan on playing well with Rubies that you install from outside of Gentoo means, even if it's technically feasible to do so.

    If this bothers you, please write in favor of removing the $RUBYOPT hack.

    If not, just pick: Either all-gentoo Ruby, or install nothing from dev-ruby.

  14. Henry Bertolucci Says:

    Thanks !!

Leave a Reply

Subscribe without commenting