linux -- require question

Discussion in 'Ruby' started by Jay Damask, Jan 10, 2008.

  1. Jay Damask

    Jay Damask Guest

    I'm a newbie. I've locally installed ruby and rubygems on my linux box
    (call it /home/). I've successfully installs rails and rake via gem
    install, however from irb I get:
    irb(main):002:0> require 'rails'
    LoadError: No such file to load -- rails
    from (irb):2:in `require'
    from (irb):2

    but for something simple it succeeds:
    irb(main):004:0> require 'date'
    => true

    $gem list
    does show me all the packages that I've installed, and

    $gem env
    correctly shows where the gems are located. I haven't explicitly set any
    environment variables...

    What do I need to do so that require finds the gems?

    Thanks.
    --
    Posted via http://www.ruby-forum.com/.
    Jay Damask, Jan 10, 2008
    #1
    1. Advertising

  2. Jay,

    I believe that you first need to require 'rubygems' in IRB before you
    can require any single gem.

    Josh

    On Jan 10, 2008, at 8:42 AM, Jay Damask wrote:

    > I'm a newbie. I've locally installed ruby and rubygems on my linux box
    > (call it /home/). I've successfully installs rails and rake via gem
    > install, however from irb I get:
    > irb(main):002:0> require 'rails'
    > LoadError: No such file to load -- rails
    > from (irb):2:in `require'
    > from (irb):2
    >
    > but for something simple it succeeds:
    > irb(main):004:0> require 'date'
    > => true
    >
    > $gem list
    > does show me all the packages that I've installed, and
    >
    > $gem env
    > correctly shows where the gems are located. I haven't explicitly
    > set any
    > environment variables...
    >
    > What do I need to do so that require finds the gems?
    >
    > Thanks.
    > --
    > Posted via http://www.ruby-forum.com/.
    >
    Joshua Schairbaum, Jan 10, 2008
    #2
    1. Advertising

  3. Jay Damask

    spin- vector Guest

    Joshua Schairbaum wrote:
    > Jay,
    >
    > I believe that you first need to require 'rubygems' in IRB before you
    > can require any single gem.
    >
    > Josh


    Josh,

    oh man! It works now. Thanks so much.

    -Jay

    --
    Posted via http://www.ruby-forum.com/.
    spin- vector, Jan 10, 2008
    #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. U. George
    Replies:
    4
    Views:
    837
    U. George
    Aug 11, 2005
  2. Gaston Garcia

    require question

    Gaston Garcia, Aug 18, 2005, in forum: Ruby
    Replies:
    4
    Views:
    104
    Gaston Garcia
    Aug 18, 2005
  3. mr ra88it

    question about require

    mr ra88it, Jan 13, 2006, in forum: Ruby
    Replies:
    2
    Views:
    90
    David Vallner
    Jan 13, 2006
  4. Jeppe Jakobsen

    Require "tk" on linux

    Jeppe Jakobsen, Mar 25, 2006, in forum: Ruby
    Replies:
    7
    Views:
    123
    Jeppe Jakobsen
    Mar 29, 2006
  5. Krishna Chaitanya
    Replies:
    1
    Views:
    138
    Krishna Chaitanya
    Feb 27, 2009
Loading...

Share This Page