Could not find RubyGem - because it's not a gem

Discussion in 'Ruby' started by Daniel Berger, Oct 15, 2008.

  1. Hi all,

    Sorry, a bit of a cross-post here, because I'm not sure if this is a
    Rails issue or a gems issue. The problem is that I've got sys-admin
    installed, just not as a gem, and that's causing a problem.

    First, some config info:

    RubyGems Environment:
    - RUBYGEMS VERSION: 1.3.0
    - RUBY VERSION: 1.8.6 (2008-03-03 patchlevel 114) [i386-mswin32_80]
    - INSTALLATION DIRECTORY: C:/ruby/lib/ruby/gems/1.8
    - RUBY EXECUTABLE: C:/ruby/bin/ruby.exe
    - EXECUTABLE DIRECTORY: C:/ruby/bin
    - RUBYGEMS PLATFORMS:
    - ruby
    - x86-mswin32-80
    - GEM PATHS:
    - C:/ruby/lib/ruby/gems/1.8
    - C:/Documents and Settings/djberge/.gem/ruby/1.8
    - GEM CONFIGURATION:
    - :update_sources => true
    - :verbose => true
    - :benchmark => false
    - :backtrace => false
    - :bulk_threshold => 1000
    - REMOTE SOURCES:
    - http://gems.rubyforge.org/

    irb(main):001:0> require 'sys/admin'
    => true

    However, if I try to fire up Rails I get this:

    C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:628:in
    `report_activate_error': Could not find RubyGem sys-admin (>= 0)
    (Gem::LoadError)
    from C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:139:in
    `activate'
    from C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:163:in
    `activate'
    from C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:162:in `each'
    from C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:162:in
    `activate'
    from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
    31:in `require'
    from C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/
    active_support/dependencies.rb:510:in `require'
    from C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/
    active_support/dependencies.rb:355:in `new_constants_in'
    from C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/
    active_support/dependencies.rb:510:in `require'
    ... 12 levels...
    from C:/ruby/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/commands/
    server.rb:39
    from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
    27:in `gem_original_require'
    from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
    27:in `require'
    from script/server:3

    What's happening here? Problem with my setup or environment? Or a
    problem with Rails?

    Thanks,

    Dan
    Daniel Berger, Oct 15, 2008
    #1
    1. Advertising

  2. Daniel Berger wrote:
    >
    > irb(main):001:0> require 'sys/admin'
    > => true
    >

    both library are different

    'sys/admin' and 'sys-admin'


    > However, if I try to fire up Rails I get this:
    >
    > C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:628:in
    > `report_activate_error': Could not find RubyGem sys-admin (>= 0)
    > (Gem::LoadError)
    > from C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:139:in



    may be you have written like this(require 'sys-admin') in you
    environment.rb

    change to
    require 'sys\admin'

    suppose if your are correct then try to install
    gem install sys-admin

    by mokkai
    --
    Posted via http://www.ruby-forum.com/.
    Sniper Abandon, Oct 16, 2008
    #2
    1. Advertising

  3. On Oct 15, 11:06=A0pm, Sniper Abandon <>
    wrote:
    > Daniel Berger wrote:
    >
    > > irb(main):001:0> require 'sys/admin'
    > > =3D> true

    >
    > both library are different
    >
    > 'sys/admin' and 'sys-admin'
    >
    > > However, if I try to fire up Rails I get this:

    >
    > > C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:628:in
    > > `report_activate_error': Could not find RubyGem sys-admin (>=3D 0)
    > > (Gem::LoadError)
    > > =A0 =A0 =A0 =A0 from C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:139:in

    >
    > may be you have written like this(require 'sys-admin') in you
    > environment.rb
    >
    > change to
    > require 'sys\admin'


    No, that's not the issue.

    > suppose if your are correct then try to install
    > gem install sys-admin


    Problematic at the moment I'm afraid.

    Regards,

    Dan
    Daniel Berger, Oct 16, 2008
    #3
  4. Daniel Berger wrote:
    >> require 'sys\admin'

    >
    > No, that's not the issue.
    >
    >> suppose if your are correct then try to install
    >> gem install sys-admin

    >
    > Problematic at the moment I'm afraid.


    Hey Dan,

    Have you tried modifying the load path with the 'gem' command? It seems
    to be able to map the path to the gem, which makes me think that's not
    the issue, but it's worth trying perhaps; maybe something activesupport
    is doing is getting in the way.

    Worst case, if it works you're on the path to a real fix. :)

    -Erik
    --
    Posted via http://www.ruby-forum.com/.
    Erik Hollensbe, Oct 16, 2008
    #4
  5. On Oct 15, 3:49=A0pm, Daniel Berger <> wrote:
    > Hi all,
    >
    > Sorry, a bit of a cross-post here,becauseI'mnotsure if this is a
    > Rails issue or a gems issue. The problem is that I've got sys-admin
    > installed, justnotas agem, and that's causing a problem.
    >
    > First, some config info:
    >
    > RubyGems Environment:
    > =A0 - RUBYGEMS VERSION: 1.3.0
    > =A0 - RUBY VERSION: 1.8.6 (2008-03-03 patchlevel 114) [i386-mswin32_80]
    > =A0 - INSTALLATION DIRECTORY: C:/ruby/lib/ruby/gems/1.8
    > =A0 - RUBY EXECUTABLE: C:/ruby/bin/ruby.exe
    > =A0 - EXECUTABLE DIRECTORY: C:/ruby/bin
    > =A0 - RUBYGEMS PLATFORMS:
    > =A0 =A0 - ruby
    > =A0 =A0 - x86-mswin32-80
    > =A0 -GEMPATHS:
    > =A0 =A0 =A0- C:/ruby/lib/ruby/gems/1.8
    > =A0 =A0 =A0- C:/Documents and Settings/djberge/.gem/ruby/1.8
    > =A0 -GEMCONFIGURATION:
    > =A0 =A0 =A0- :update_sources =3D> true
    > =A0 =A0 =A0- :verbose =3D> true
    > =A0 =A0 =A0- :benchmark =3D> false
    > =A0 =A0 =A0- :backtrace =3D> false
    > =A0 =A0 =A0- :bulk_threshold =3D> 1000
    > =A0 - REMOTE SOURCES:
    > =A0 =A0 =A0-http://gems.rubyforge.org/
    >
    > irb(main):001:0> require 'sys/admin'
    > =3D> true
    >
    > However, if I try to fire up Rails I get this:
    >
    > C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:628:in
    > `report_activate_error': Couldnotfind RubyGem sys-admin (>=3D 0)
    > (Gem::LoadError)
    > =A0 =A0 =A0 =A0 from C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:139:in
    > `activate'
    > =A0 =A0 =A0 =A0 from C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:163:in
    > `activate'
    > =A0 =A0 =A0 =A0 from C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:162:in `e=

    ach'
    > =A0 =A0 =A0 =A0 from C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:162:in
    > `activate'
    > =A0 =A0 =A0 =A0 from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_requi=

    re.rb:
    > 31:in `require'
    > =A0 =A0 =A0 =A0 from C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.1/l=

    ib/
    > active_support/dependencies.rb:510:in `require'
    > =A0 =A0 =A0 =A0 from C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.1/l=

    ib/
    > active_support/dependencies.rb:355:in `new_constants_in'
    > =A0 =A0 =A0 =A0 from C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.1/l=

    ib/
    > active_support/dependencies.rb:510:in `require'
    > =A0 =A0 =A0 =A0 =A0... 12 levels...
    > =A0 =A0 =A0 =A0 from C:/ruby/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/comma=

    nds/
    > server.rb:39
    > =A0 =A0 =A0 =A0 from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_requi=

    re.rb:
    > 27:in `gem_original_require'
    > =A0 =A0 =A0 =A0 from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_requi=

    re.rb:
    > 27:in `require'
    > =A0 =A0 =A0 =A0 from script/server:3
    >
    > What's happening here? Problem with my setup or environment? Or a
    > problem with Rails?


    Ok, I think I've narrow this down a bit. The background to this is
    that I've installed the library called "win32-file" via rubygems. That
    library has a dependency on win32-file-stat, which in turn has a
    dependency on windows-pr, which in turn has a dependency on windows-
    api which in turn has a dependency on win32-api.

    You with me so far? It's the win32-api gem (or lack thereof) that's
    ultimately causing the issue.

    You see, I'm using a custom built Ruby using VC++ 8.0, so I had to
    uninstall win32-api (because the current binary gem I have out there
    is incompatible with my runtime), so that rubygems defaults to the
    win32-api I've built by hand and installed in Ruby's sitelibdir. At
    least that's what I thought it would do.

    And here's where it seems to get confused. Because one of the
    dependencies itself has a dependency on win32-api, but I've removed
    the win32-api gem, it dies instead of resorting to
    gem_original_require as a last ditch effort.

    I _think_ this can be resolved by rescuing Gem::LoadError in
    custom_require.rb, but I'm still deciding how to proceed.

    If anyone has any suggestion in the meantime, I'm all ears.

    Regards,

    Dan
    Daniel Berger, Oct 29, 2008
    #5
    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. Roxanne
    Replies:
    0
    Views:
    1,220
    Roxanne
    Jul 4, 2003
  2. han
    Replies:
    0
    Views:
    150
  3. han
    Replies:
    1
    Views:
    116
    Lyle Johnson
    Oct 24, 2005
  4. han
    Replies:
    0
    Views:
    213
  5. Markus Kolb
    Replies:
    4
    Views:
    167
    Jim Weirich
    Apr 2, 2006
Loading...

Share This Page