Broken gemspec on redis-rack-1.4.1 #131

Closed
jigardoshi opened this Issue May 11, 2012 · 2 comments

Comments

Projects
None yet
3 participants

Similiar to : jodosha#91

This might have reopened in redis-rack-1.4.1. I have Ruby 1.9.2 and Rails 2.3.1

When I run bundle update I get :

Invalid gemspec in [/Users/jigard/.rvm/gems/ruby-1.9.2-p0/specifications/redis-rack-1.4.1.gemspec]: Illformed requirement ["#Syck::DefaultKey:0x00000103057e28 1.4.1"]
Invalid gemspec in [/Users/jigard/.rvm/gems/ruby-1.9.2-p0/specifications/redis-rack-1.4.1.gemspec]: Illformed requirement ["#Syck::DefaultKey:0x00000103057e28 1.4.1"]
Invalid gemspec in [/Users/jigard/.rvm/gems/ruby-1.9.2-p0/specifications/redis-rack-1.4.1.gemspec]: Illformed requirement ["#Syck::DefaultKey:0x00000103057e28 1.4.1"]
Fetching gem metadata from http://rubygems.org/......
Fetching gem metadata from http://rubygems.org/..
Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at https://github.com/carlhuda/bundler/issues so that we can fix it. Please include the full output of the command, your Gemfile and Gemfile.lock. Thanks!
/Users/jigard/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/site_ruby/1.9.1/rubygems/requirement.rb:134:in block in satisfied_by?': undefined methodcall' for nil:NilClass (NoMethodError)
from /Users/jigard/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/site_ruby/1.9.1/rubygems/requirement.rb:134:in each'
from /Users/jigard/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/site_ruby/1.9.1/rubygems/requirement.rb:134:inall?'
from /Users/jigard/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/site_ruby/1.9.1/rubygems/requirement.rb:134:in satisfied_by?'
from /Users/jigard/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:181:inmatches_spec?'
from /Users/jigard/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.1.3/lib/bundler/index.rb:147:in block in search_by_dependency'
from /Users/jigard/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.1.3/lib/bundler/index.rb:145:inselect'
from /Users/jigard/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.1.3/lib/bundler/index.rb:145:in `search_by_dependency'

In my gemfile I use

gem "redis-store"
gem "redis-rails", "3.2.1"

Redis-rack obviously is pulled in from redis-rails.

When I look at the Gemspec file I see :

if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q, ["> 1.1.0"])
s.add_runtime_dependency(%q, ["#Syck::DefaultKey:0x00000103057e28 1.4.1"])
s.add_development_dependency(%q, ["
> 0.9.2.2"])
s.add_development_dependency(%q, ["> 1.1.rc"])
s.add_development_dependency(%q, ["
> 0.10.0"])
s.add_development_dependency(%q, ["> 2.8.0"])
s.add_development_dependency(%q, ["
> 1.0.0"])
else
s.add_dependency(%q, ["> 1.1.0"])
s.add_dependency(%q, ["#Syck::DefaultKey:0x00000103057e28 1.4.1"])
s.add_dependency(%q, ["
> 0.9.2.2"])
s.add_dependency(%q, ["> 1.1.rc"])
s.add_dependency(%q, ["
> 0.10.0"])
s.add_dependency(%q, ["> 2.8.0"])
s.add_dependency(%q, ["
> 1.0.0"])
end
else
s.add_dependency(%q, ["> 1.1.0"])
s.add_dependency(%q, ["#Syck::DefaultKey:0x00000103057e28 1.4.1"])
s.add_dependency(%q, ["
> 0.9.2.2"])
s.add_dependency(%q, ["> 1.1.rc"])
s.add_dependency(%q, ["
> 0.10.0"])
s.add_dependency(%q, ["> 2.8.0"])
s.add_dependency(%q, ["
> 1.0.0"])
end

When I correct the gemspec file manually, bundle update and bundle install are fine.

Please create a new gemspec and gem.

Contributor

mhoran commented May 24, 2012

I'm not sure I totally understand what the issue with the gemspec is here, as everything works just great here. There is an issue with certain RubyGems versions, though that may be because newer versions mask this issue. Do you have any pointers to how to fix the gemspec?

Tried it on my Devo server (ubuntu) after my macbook. The problem persists. Maybe it does have to do with my bundler + gem + ruby combination. The versions are given below ...

ruby 1.9.2p136 (2010-12-25) [x86_64-linux]
gem 1.3.7
Bundler version 1.0.7

Everything works after I fix the file (in my case /usr/local/lib/ruby/gems/1.9.1/specifications/redis-rack-1.4.1.gemspec) manually : where I convert #Syck::DefaultKey:0x00000103057e28 into ~>

The changed file become like this :

  s.name = %q{redis-rack}
  s.version = "1.4.1"

  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
  s.authors = ["Luca Guidi"]
  s.date = %q{2012-02-17}
  s.description = %q{Redis Store for Rack}
  s.email = ["guidi.luca@gmail.com"]
  s.files = [".gitignore", "Gemfile", "MIT-LICENSE", "README.md", "Rakefile", "lib/rack/session/redis.rb", "lib/redis-rack.rb", "lib/redis/rack/version.rb", "redis-rack.gemspec", "test/rack/session/redis_test.rb", "test/redis/rack/version_test.rb", "test/test_helper.rb"]
  s.homepage = %q{http://jodosha.github.com/redis-store}
  s.require_paths = ["lib"]
  s.rubyforge_project = %q{redis-rack}
  s.rubygems_version = %q{1.3.7}
  s.summary = %q{Redis Store for Rack}
  s.test_files = ["test/rack/session/redis_test.rb", "test/redis/rack/version_test.rb", "test/test_helper.rb"]

  if s.respond_to? :specification_version then
    current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
    s.specification_version = 3

    if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
      s.add_runtime_dependency(%q<redis-store>, ["~> 1.1.0"])
      s.add_runtime_dependency(%q<rack>, ["~> 1.4.1"])
      s.add_development_dependency(%q<rake>, ["~> 0.9.2.2"])
      s.add_development_dependency(%q<bundler>, ["~> 1.1.rc"])
      s.add_development_dependency(%q<mocha>, ["~> 0.10.0"])
      s.add_development_dependency(%q<minitest>, ["~> 2.8.0"])
      s.add_development_dependency(%q<purdytest>, ["~> 1.0.0"])
    else
      s.add_dependency(%q<redis-store>, ["~> 1.1.0"])
      s.add_dependency(%q<rack>, ["~> 1.4.1"])
      s.add_dependency(%q<rake>, ["~> 0.9.2.2"])
      s.add_dependency(%q<bundler>, ["~> 1.1.rc"])
      s.add_dependency(%q<mocha>, ["~> 0.10.0"])
      s.add_dependency(%q<minitest>, ["~> 2.8.0"])
      s.add_dependency(%q<purdytest>, ["~> 1.0.0"])
    end
  else
    s.add_dependency(%q<redis-store>, ["~> 1.1.0"])
    s.add_dependency(%q<rack>, ["~> 1.4.1"])
    s.add_dependency(%q<rake>, ["~> 0.9.2.2"])
    s.add_dependency(%q<bundler>, ["~> 1.1.rc"])
    s.add_dependency(%q<mocha>, ["~> 0.10.0"])
    s.add_dependency(%q<minitest>, ["~> 2.8.0"])
    s.add_dependency(%q<purdytest>, ["~> 1.0.0"])
  end

I see the same problem (#Syck etc. ) mentioned in another issue jodosha#91 which I have referred.

I will update my bundler, gem and ruby combination to see if it goes away

jodosha closed this Aug 29, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment