Can't get gems to work (1.9, Windows)

Discussion in 'Ruby' started by jana.koivu@gmail.com, Apr 2, 2008.

  1. Guest

    Hi,

    I can't get gems to work in my 1.9 install. Can anyone help?

    The gem command worked ('gem install log4r'), but when I try to
    include it from a script, I just get 'no such file to load'.

    The gem got installed into the directory 'c:\LAN'. Does that seem
    correct?

    If I use filemon or procmon while running my script, I notice that
    Ruby is *only* searching the directories under c:\ruby-1.9\lib\ruby.

    I've tried changing RUBYOPTS, GEM_PATH, GEM_HOME, to no avail.

    Jana
     
    , Apr 2, 2008
    #1
    1. Advertising

  2. On Tue, Apr 1, 2008 at 6:35 PM, <> wrote:
    > Hi,
    >
    > I can't get gems to work in my 1.9 install. Can anyone help?
    >
    > The gem command worked ('gem install log4r'), but when I try to
    > include it from a script, I just get 'no such file to load'.
    >
    > The gem got installed into the directory 'c:\LAN'. Does that seem
    > correct?
    >
    > If I use filemon or procmon while running my script, I notice that
    > Ruby is *only* searching the directories under c:\ruby-1.9\lib\ruby.
    >
    > I've tried changing RUBYOPTS, GEM_PATH, GEM_HOME, to no avail.
    >
    > Jana


    Ruby Gems seems to have a broken default install-dir in the released
    Windows build of 1.9; other comments I've seen suggest that using an
    explicit --install-dir pointing to the right directory should solve
    that problem.
     
    Christopher Dicely, Apr 2, 2008
    #2
    1. Advertising

  3. Guest

    On Apr 2, 1:24 am, Christopher Dicely <> wrote:
    > On Tue, Apr 1, 2008 at 6:35 PM,  <> wrote:
    > > Hi,

    >
    > >  I can't get gems to work in my 1.9 install. Can anyone help?

    >
    > >  The gem command worked ('gem install log4r'), but when I try to
    > >  include it from a script, I just get 'no such file to load'.

    >
    > >  The gem got installed into the directory 'c:\LAN'. Does that seem
    > >  correct?

    >
    > >  If I use filemon or procmon while running my script, I notice that
    > >  Ruby is *only* searching the directories under c:\ruby-1.9\lib\ruby.

    >
    > >  I've tried changing RUBYOPTS, GEM_PATH, GEM_HOME, to no avail.

    >
    > >  Jana

    >
    > Ruby Gems seems to have a broken default install-dir in the released
    > Windows build of 1.9; other comments I've seen suggest that using an
    > explicit --install-dir pointing to the right directory should solve
    > that problem.


    Hi Christopher, thank-you.

    I can use --install-dir to force gem to install into the proper place,
    but ruby still doesn't find the gem when I run my script:

    > \ruby-1.9\bin\gem.bat install --install-dir c:\ruby-1.9\lib\ruby\gems\1.9.0 log4r

    Bulk updating Gem source index for: http://gems.rubyforge.org
    Successfully installed log4r-1.0.5
    1 gem installed
    Installing ri documentation for log4r-1.0.5...
    Installing RDoc documentation for log4r-1.0.5...

    > \ruby-1.9\bin\ruby -e "require 'log4r'"

    -e:1:in `require': no such file to load -- log4r (LoadError)
    from -e:1:in `<main>'

    Filemon tells me that the only places that ruby is searching for the
    library are:

    lib\ruby\site_ruby
    lib\ruby\vendor_ruby
    lib\ruby\1.9.0

    How do I get it to search the gems directory?

    Jana
     
    , Apr 2, 2008
    #3
  4. On Wed, Apr 2, 2008 at 4:25 AM, <> wrote:
    > On Apr 2, 1:24 am, Christopher Dicely <> wrote:
    >
    >
    > > On Tue, Apr 1, 2008 at 6:35 PM, <> wrote:
    > > > Hi,

    > >
    > > > I can't get gems to work in my 1.9 install. Can anyone help?

    > >
    > > > The gem command worked ('gem install log4r'), but when I try to
    > > > include it from a script, I just get 'no such file to load'.

    > >
    > > > The gem got installed into the directory 'c:\LAN'. Does that seem
    > > > correct?

    > >
    > > > If I use filemon or procmon while running my script, I notice that
    > > > Ruby is *only* searching the directories under c:\ruby-1.9\lib\ruby.

    > >
    > > > I've tried changing RUBYOPTS, GEM_PATH, GEM_HOME, to no avail.

    > >
    > > > Jana

    > >
    > > Ruby Gems seems to have a broken default install-dir in the released
    > > Windows build of 1.9; other comments I've seen suggest that using an
    > > explicit --install-dir pointing to the right directory should solve
    > > that problem.

    >
    > Hi Christopher, thank-you.
    >
    > I can use --install-dir to force gem to install into the proper place,
    > but ruby still doesn't find the gem when I run my script:
    >
    > > \ruby-1.9\bin\gem.bat install --install-dir c:\ruby-1.9\lib\ruby\gems\1.9.0 log4r

    > Bulk updating Gem source index for: http://gems.rubyforge.org
    > Successfully installed log4r-1.0.5
    > 1 gem installed
    > Installing ri documentation for log4r-1.0.5...
    > Installing RDoc documentation for log4r-1.0.5...
    >
    > > \ruby-1.9\bin\ruby -e "require 'log4r'"

    > -e:1:in `require': no such file to load -- log4r (LoadError)
    > from -e:1:in `<main>'
    >
    > Filemon tells me that the only places that ruby is searching for the
    > library are:
    >
    > lib\ruby\site_ruby
    > lib\ruby\vendor_ruby
    > lib\ruby\1.9.0
    >
    > How do I get it to search the gems directory?



    That's odd. I think my Ruby 1.9.0-on-Windows-fu has been exhausted
    (I just remember the problem with installing gems into the wrong directory
    and the fix; I remember running into enough quirks that I decided to restrict
    myself to 1.8 until there is a 1.9 One-Click-Installer, or at least a
    new release
    of 1.9 for Windows.)
     
    Christopher Dicely, Apr 2, 2008
    #4
    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:
    428
    Tomás
    Mar 5, 2006
  2. Lloyd Zusman
    Replies:
    3
    Views:
    186
    Lloyd Zusman
    Jun 21, 2005
  3. Dany Cayouette

    'private' gems/gems hierarchy

    Dany Cayouette, Nov 25, 2005, in forum: Ruby
    Replies:
    3
    Views:
    160
    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:
    194
    Thaddeus L Olczyk
    Aug 15, 2006
  5. Patrick Hurley

    Creating binary gems, from source gems

    Patrick Hurley, Mar 4, 2007, in forum: Ruby
    Replies:
    0
    Views:
    139
    Patrick Hurley
    Mar 4, 2007
Loading...

Share This Page