When trying to install the gem laser, I got an error that laser requires laser!
I’m not so much asking for help on how to install laser, but how to debug what went wrong
The following is what I get when I try a vanilla install of a local version
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)
Trying again:
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)
I tried using the switches listed by 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)
I tried looking at both https://github.com/michaeledgar/laser/blob/master/laser.gemspec and https://github.com/michaeledgar/laser/blob/master/Rakefile but couldn’t find a circular dependency.
The workaround I used was to go Jedi and use the --force option. Now I’m dealing with a different installation error!
According to the bug report, it was due to a conflict between jeweler and bundler. That’d explain why I wasn’t able to identify a specific offending line of code.