如何调试由于循环依赖而失败的rubygem安装?

时间:2011-07-26 01:34:11

标签: ruby debugging rubygems gem

当试图安装宝石激光器时,我得到一个错误,激光需要激光!

我不是在寻求如何安装激光的帮助,而是如何调试出错的方法

以下是我尝试使用本地版本的vanilla安装时获得的内容

C:\Documents and Settings\a.grimm\Desktop\code\sandbox\laser>gem install pkg\laser-0.5.2.gem
Fetching: polyglot-0.3.1.gem (100%)
Fetching: treetop-1.4.9.gem (100%)
Fetching: ripper-plus-1.3.0.gem (100%)
Fetching: axiom_of_choice-1.0.0.gem (100%)
Fetching: stream-0.5.gem (100%)
Fetching: object_regex-1.0.1.gem (100%)
Fetching: trollop-1.16.2.gem (100%)
ERROR:  Error installing pkg\laser-0.5.2.gem:
        laser requires laser (>= 0)

再试一次:

C:\Documents and Settings\a.grimm\Desktop\code\sandbox\laser>gem install pkg\laser-0.5.2.gem
ERROR:  Error installing pkg\laser-0.5.2.gem:
        laser requires laser (>= 0)

我尝试使用gem help install

列出的开关
C:\Documents and Settings\a.grimm\Desktop\code\sandbox\laser>gem install --verbose pkg\laser-0.5.2.gem
GET http://rubygems.org/latest_specs.4.8.gz
302 Found
GET http://production.s3.rubygems.org/latest_specs.4.8.gz
304 Not Modified
GET http://rubygems.org/specs.4.8.gz
302 Found
GET http://production.s3.rubygems.org/specs.4.8.gz
304 Not Modified
Installing gem laser-0.5.2
Using local gem C:/Ruby19/lib/ruby/gems/1.9.1/cache/laser-0.5.2.gem
ERROR:  Error installing pkg\laser-0.5.2.gem:
        laser requires laser (>= 0)

C:\Documents and Settings\a.grimm\Desktop\code\sandbox\laser>gem install --backtrace pkg\laser-0.5.2.gem
ERROR:  Error installing pkg\laser-0.5.2.gem:
        laser requires laser (>= 0)

C:\Documents and Settings\a.grimm\Desktop\code\sandbox\laser>gem install --debug pkg\laser-0.5.2.gem
Exception `NameError' at C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:163 - uninitialized constant Gem::Commands::InstallCommand
Exception `LoadError' at C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - no such file to load -- psych
Exception `LoadError' at C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60 - no such file to load -- psych
Exception `NoMethodError' at C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_input.rb:53 - undefined method `readpartial' for #<Gem::Package::TarReader::Entry:0x1a95360>
Exception `NoMethodError' at C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:449 - undefined method `readpartial' for #<Gem::Package::TarReader::Entry:0x1a95360>
Exception `IOError' at C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/format.rb:45 - closed stream
Exception `Gem::LoadError' at C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:926 - Could not find RubyGem sources (> 0.0.1)

Exception `NoMethodError' at C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_input.rb:53 - undefined method `readpartial' for #<Gem::Package::TarReader::Entry:0x2bedb00>
Exception `NoMethodError' at C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:449 - undefined method `readpartial' for #<Gem::Package::TarReader::Entry:0x2bedb00>
Exception `IOError' at C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/format.rb:45 - closed stream
Exception `Errno::EEXIST' at C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:243 - File exists - C:/Ruby19/lib/ruby/gems/1.9.1
Exception `Gem::InstallError' at C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:208 - laser requires laser (>= 0)
ERROR:  Error installing pkg\laser-0.5.2.gem:
        laser requires laser (>= 0)

我尝试查看https://github.com/michaeledgar/laser/blob/master/laser.gemspechttps://github.com/michaeledgar/laser/blob/master/Rakefile,但找不到循环依赖。

我使用的解决方法是去Jedi并使用--force选项。现在我正在处理一个不同的安装错误!

1 个答案:

答案 0 :(得分:0)

根据bug report,这是由于珠宝商和捆绑商之间的冲突。这就解释了为什么我无法识别特定的违规行代码。