Bugs item #27608, was opened at 2009-12-21 14:35
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=27608&group_id=126

Category: `gem install` command
Group: v1.3.x
Status: Closed
Resolution: Accepted
Priority: 5
Submitted By: Roger Pack (rogerdpack)
Assigned to: Eric Hodel (drbrain)
Summary: installation of some dependencies fails

Initial Comment:
Originally reported here
http://www.ruby-forum.com/topic/200649#new

"gem install sane" fails with

s...@devielle:~$ gem install google_hash
ERROR:  Error installing google_hash:
  sane requires os (>= 0, runtime)

more info (from different computer).

C:\dev\ruby\downloads\jruby\bin>gem install --debug -V sane

Exception `Gem::LoadError' at 
C:/dev/ruby/downloads/jruby/lib/ruby/site_ruby/1.8/rubygems.rb:827 - Could not 
find RubyGem jruby-openssl (>= 0)

JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
Exception `Gem::LoadError' at 
C:/dev/ruby/downloads/jruby/lib/ruby/site_ruby/1.8/rubygems.rb:827 - Could not 
find RubyGem jruby-openssl (>= 0)

Exception `LoadError' at 
C:/dev/ruby/downloads/jruby/lib/ruby/site_ruby/shared/jruby/openssl/autoloads/x509.rb:8
 - OpenSSL::X509 requires the jruby-openssl gem
Exception `Gem::LoadError' at 
C:/dev/ruby/downloads/jruby/lib/ruby/site_ruby/1.8/rubygems.rb:827 - Could not 
find RubyGem test-unit (>= 0)

GET 200 OK: http://gems.rubyforge.org/latest_specs.4.8.gz
GET 200 OK: http://gems.github.com/latest_specs.4.8.gz
Installing gem sane-0.16.0
Exception `Gem::InstallError' at 
C:/dev/ruby/downloads/jruby/lib/ruby/site_ruby/1.8/rubygems/installer.rb:255 - 
sane requires os (>= 0, runtime)
ERROR:  Error installing sane:
        sane requires os (>= 0, runtime)
Exception `Gem::SystemExitException' at 
C:/dev/ruby/downloads/jruby/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:170
 - Exiting RubyGems with exit_code 1


C:\dev\ruby\downloads\jruby\bin>gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.5
  - RUBY VERSION: 1.8.7 (2009-12-21 patchlevel 174) [java]
  - INSTALLATION DIRECTORY: C:/dev/ruby/downloads/jruby/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: C:/dev/ruby/downloads/jruby/bin/jruby.exe
  - EXECUTABLE DIRECTORY: C:/dev/ruby/downloads/jruby/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-java-1.6
  - GEM PATHS:
     - C:/dev/ruby/downloads/jruby/lib/ruby/gems/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - "install" => "--env-shebang"
     - "update" => "--env-shebang"
     - :sources => ["http://gems.rubyforge.org/";]
     - "gem" => "--no-ri --no-rdoc"
     - "gemcutter_key" => "1fac3373c066bf27dd8ad967f1bb7505"
  - REMOTE SOURCES:
     - http://gems.rubyforge.org/

----------------------------------------------------------------------

>Comment By: Roger Pack (rogerdpack)
Date: 2010-02-22 17:04

Message:
Thanks this works no with 1.3.6
I can distribute my gems without fear now :)
-r

----------------------------------------------------------------------

Comment By: Eric Hodel (drbrain)
Date: 2010-01-19 00:31

Message:
Fixed in r2337.

RubyGems was not ignoring development dependencies and (for thin) rack had a 
development dependency on thin which created a cycle.

As a workaround you can gem install --force.

----------------------------------------------------------------------

Comment By: Luis Lavena (luislavena)
Date: 2009-12-31 02:53

Message:
Ok, last attempt

tested locally, with a gem server (Webrick) having only latest rack, 
eventmachine, daemons and thin.

It fails to install rack gem in tandem, but works with any of the others gems 
missing when requested to install "thin"

Checking inside the code, found this:

lib/rubygems/dependency_installer.rb:159
@gems_to_install = dependency_list.dependency_order.reverse

And checking at runtime:

*** GEMS to INSTALL #<Gem::Specification name=thin 
version=1.2.5>#<Gem::Specification name=rack version=1.0.0>

Removing the reverse, works, but not from a fresh start.

So, seems that the dependency chain is not being solved properly.



----------------------------------------------------------------------

Comment By: Luis Lavena (luislavena)
Date: 2009-12-31 01:29

Message:
OK, this is not only applicable to RubyGems 1.3.5 on Ruby 1.9.1, but also on 
Ruby 1.8.6:

http://pastie.org/762053

Even worse, it happens the same using RVM on Ubuntu:

http://pastie.org/762055

Did a simple test:

Installed rack manually
Uninstalled daemons.
Attempt to install think again worked.

Appears that rack gem has something bogus?


----------------------------------------------------------------------

Comment By: Roger Pack (rogerdpack)
Date: 2009-12-31 00:38

Message:

E:\installs\ruby-1.9.1-p376_installed\bin>gem install
--debug -V thin
Exception `NameError' at
E:/installs/ruby-1.9.1-p376_installed/lib/ruby/1.9.1/rubygems/command_manager.rb:134
- uninitialized constant Gem::Commands::InstallCommand
GET 200 OK: http://gems.rubyforge.org/latest_specs.4.8.gz
Exception `Errno::EEXIST' at
E:/installs/ruby-1.9.1-p376_installed/lib/ruby/1.9.1/fileutils.rb:243
- File exists - C:\Documents and
Settings\packrd/.gem/specs/gems.rubyforge.org%80
Installing gem thin-1.2.5
Exception `NoMethodError' at
E:/installs/ruby-1.9.1-p376_installed/lib/ruby/1.9.1/rubygems/package/tar_input.rb:50
- undefined method `readpartial' for
#<Gem::Package::TarReader::Entry:0x156e3a0>
Exception `IOError' at
E:/installs/ruby-1.9.1-p376_installed/lib/ruby/1.9.1/rubygems/format.rb:50
- closed stream
Exception `Errno::EEXIST' at
E:/installs/ruby-1.9.1-p376_installed/lib/ruby/1.9.1/fileutils.rb:243
- File exists -
E:/installs/ruby-1.9.1-p376_installed/lib/ruby/gems/1.9.1
Exception `Gem::InstallError' at
E:/installs/ruby-1.9.1-p376_installed/lib/ruby/1.9.1/rubygems/installer.rb:250
- thin requires rack (>= 1.0.0, runtime)
ERROR:  Error installing thin:
        thin requires rack (>= 1.0.0, runtime)


----------------------------------------------------------------------

Comment By: Luis Lavena (luislavena)
Date: 2009-12-30 22:37

Message:
Roger: 

I've asked if you could run the command with --debug and -V options, and you 
didn't

Please do so we can trace it out.

Thank you.

----------------------------------------------------------------------

Comment By: Roger Pack (rogerdpack)
Date: 2009-12-30 22:25

Message:
Appears I already had the eventmachine gem installed, in
this instance, since it doesn't build except by hand.

Here's with 1.9.1p376 "from source" (after installing
eventmachine by hand, since it doesn't build cleanly)

E:\>\installs\ruby-1.9.1-p376_installed\bin\gem -v
1.3.1

E:\>\installs\ruby-1.9.1-p376_installed\bin\gem install thin
ERROR:  Error installing thin:
        thin requires rack (>= 1.0.0, runtime)

----------------------------------------------------------------------

Comment By: Luis Lavena (luislavena)
Date: 2009-12-30 20:21

Message:
When you install thin, it compiles eventmachine.

Seems that it only resolves the first dependency and then fails.

Can you please try with the version of RubyGems that cames with 1.9.1 instead 
of the 1.3.5 on top of it?

Thank you.


----------------------------------------------------------------------

Comment By: Roger Pack (rogerdpack)
Date: 2009-12-30 18:27

Message:
here's another manifestation of it

E:\dev\ruby\allgems\lib>gem install thin
Building native extensions.  This could take a while...
ERROR:  Error installing thin:
        thin requires rack (>= 1.0.0, runtime)

E:\dev\ruby\allgems\lib>gem install rack
Successfully installed rack-1.0.1
1 gem installed

E:\dev\ruby\allgems\lib>gem install thin
Building native extensions.  This could take a while...
Successfully installed thin-1.2.5
1 gem installed

E:\dev\ruby\allgems\lib>ruby -v
ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-mingw32]

E:\dev\ruby\allgems\lib>gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.5
  - RUBY VERSION: 1.9.1 (2009-12-07 patchlevel 376) [i386-
mingw32]
  - INSTALLATION DIRECTORY: 
E:/installs/ruby191p376/lib/ruby/gems/1.9.1
  - RUBY EXECUTABLE: E:/installs/ruby191p376/bin/ruby.exe
  - EXECUTABLE DIRECTORY: E:/installs/ruby191p376/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-mingw32
  - GEM PATHS:
     - E:/installs/ruby191p376/lib/ruby/gems/1.9.1
     - C:/Documents and Settings/packrd/.gem/ruby/1.9.1
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - :sources => ["http://gems.rubyforge.org/";]
     - "gem" => "--no-ri --no-rdoc"
     - "gemcutter_key" => "1fac3373c066bf27dd8ad967f1bb7505"
  - REMOTE SOURCES:
     - http://gems.rubyforge.org/

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=27608&group_id=126
_______________________________________________
Rubygems-developers mailing list
http://rubyforge.org/projects/rubygems
Rubygems-developers@rubyforge.org
http://rubyforge.org/mailman/listinfo/rubygems-developers

Reply via email to