gems not recognized -- can't fake fox14

Discussion in 'Ruby' started by bwv549, Nov 10, 2005.

  1. bwv549

    bwv549 Guest

    Some gems, after installation, cannot be found with a "require
    <whatever_gem>" statement. Perhaps this is specific to my ruby
    install, but I am not sure.

    I installed gnuplot.rb and it was not found with a require statement.
    So, I made a soft link:
    ln -s /usr/local/lib/ruby/gems/1.8/gems/gnuplot-2.1/lib/gnuplot.rb
    /usr/local/lib/ruby/site_ruby/1.8/gnuplot.rb

    and that solved the problem for gnuplot, although in a somewhat
    unsatisfying way.

    Now, I installed fxruby with no problems, but again, I try to 'require
    fox14' and it fails:
    -e:1:in `require': No such file to load -- fox14 (LoadError)

    This time, making a soft link to the fox14 directory does NOT fix the
    problem:
    ln -s /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.4.3/lib/fox14
    /usr/local/lib/ruby/site_ruby/1.8/fox14

    The output of "ruby -e 'p $LOAD_PATH'" is:
    ["/usr/local/lib/ruby/site_ruby/1.8",
    "/usr/local/lib/ruby/site_ruby/1.8/i686-linux",
    "/usr/local/lib/ruby/site_ruby", "/usr/local/lib/ruby/1.8",
    "/usr/local/lib/ruby/1.8/i686-linux", "."]
    (I am running Mandriva 2005 LE)

    Is there a way to permanently add the gems folder to $LOAD_PATH?
    Does a require statement have to point to a *.rb file, or can it point
    to the directory?

    Thank You.
    bwv549, Nov 10, 2005
    #1
    1. Advertising

  2. bwv549

    Lyle Johnson Guest

    On 11/10/05, bwv549 <> wrote:

    > Some gems, after installation, cannot be found with a "require
    > <whatever_gem>" statement. Perhaps this is specific to my ruby
    > install, but I am not sure.


    <snip>

    Have you set your RUBYOPT environment variable to include the
    "-rubygems" flag? See the comments here:

    http://docs.rubygems.org/read/chapter/3#page70

    Hope this helps,

    Lyle
    Lyle Johnson, Nov 10, 2005
    #2
    1. Advertising

  3. bwv549

    bwv549 Guest

    That was it! Thanks a bunch!
    bwv549, Nov 11, 2005
    #3
    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. Tomás

    Gems -- #include <gems.hpp>

    Tomás, Mar 4, 2006, in forum: C++
    Replies:
    7
    Views:
    411
    Tomás
    Mar 5, 2006
  2. Lloyd Zusman
    Replies:
    3
    Views:
    172
    Lloyd Zusman
    Jun 21, 2005
  3. Dany Cayouette

    'private' gems/gems hierarchy

    Dany Cayouette, Nov 25, 2005, in forum: Ruby
    Replies:
    3
    Views:
    148
    Jim Weirich
    Nov 25, 2005
  4. Thaddeus L Olczyk

    Problem getting gems/listing gems. EINVAL

    Thaddeus L Olczyk, Aug 15, 2006, in forum: Ruby
    Replies:
    0
    Views:
    180
    Thaddeus L Olczyk
    Aug 15, 2006
  5. Albert Schlef

    Gems installed to $HOME not recognized

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

Share This Page