gems and custom_require problem for ruby(1.9.2dev)/rubygems(1.3.6)installed in $HOME

Discussion in 'Ruby' started by Nikolai Lugovoi, Mar 17, 2010.

  1. I installed ruby 1.9.2dev (2010-03-17 trunk 26961) [i686-linux] in my
    $HOME dir using configure --prefix=$HOME && make install
    also i set PATH=$HOME/bin:$PATH

    Then, I tried to run rake test on edge rails version, having required
    gems installed via "bundle install"

    gem list shows them installed

    But, "rake test", complained that it cannot find required rubygems,
    like: activerecord/test/cases/helper.rb:12:in `require': no such file
    to load -- mocha

    As a workaround, it started only with following RUBYOPT options:

    RUBYOPT="-rubygems -rrubygems/custom_require" rake test

    What am I missing that causes the problem?

    Also, here is sample IRB session showing the issue:
    $ irb
    irb(main):001:0> RUBY_VERSION
    => "1.9.2"
    irb(main):002:0> Gem::VERSION
    => "1.3.6"
    irb(main):003:0> require 'mocha'
    LoadError: no such file to load -- mocha
    from (irb):3:in `require'
    from (irb):3
    from /home/nlugovoi/bin/irb:12:in `<main>'
    irb(main):004:0> require 'rubygems'
    => false
    irb(main):005:0> require 'mocha'
    LoadError: no such file to load -- mocha
    from (irb):5:in `require'
    from (irb):5
    from /home/nlugovoi/bin/irb:12:in `<main>'
    irb(main):006:0> require 'rubygems/custom_require'
    => true
    irb(main):007:0> require 'mocha'
    => true
    irb(main):008:0> Gem.path
    => ["/home/nlugovoi/.gem/ruby/1.9.1", "/home/nlugovoi/lib/ruby/gems/1.9.1"]
     
    Nikolai Lugovoi, Mar 17, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeremy Woertink

    Problem with custom_require

    Jeremy Woertink, Aug 16, 2007, in forum: Ruby
    Replies:
    0
    Views:
    97
    Jeremy Woertink
    Aug 16, 2007
  2. Nikolai Lugovoi
    Replies:
    1
    Views:
    142
    Thomas Preymesser
    Sep 4, 2009
  3. Ollivier Robert

    1.9.2dev compilation with clang 1.1

    Ollivier Robert, Feb 26, 2010, in forum: Ruby
    Replies:
    0
    Views:
    113
    Ollivier Robert
    Feb 26, 2010
  4. Benjamin Ter kuile
    Replies:
    0
    Views:
    120
    Benjamin Ter kuile
    Mar 21, 2010
  5. Albert Schlef

    Gems installed to $HOME not recognized

    Albert Schlef, Apr 2, 2010, in forum: Ruby
    Replies:
    2
    Views:
    141
    Jesper Fruergaard Andersen
    Apr 13, 2010
Loading...

Share This Page