Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

gemspec issue with 3.1.0 release #215

Closed
logicminds opened this Issue Jul 17, 2012 · 7 comments

Comments

Projects
None yet
4 participants

Not sure what went wrong but the gemspec for the 3.1.0 release is messing up my environment. Reverting to 3.0.1 fixes the issue.

WARNING:  Invalid .gemspec format in '/usr/lib/ruby/gems/1.8/specifications/shoulda-3.1.0.gemspec'
ERROR:  While executing gem ... (RuntimeError)
    Unknown command lsit
[root@puppet2 gems]# gem list
WARNING:  #<ArgumentError: Illformed requirement ["#<YAML::Syck::DefaultKey:0x7f57bcc7bf80> 3.0.12"]>
# -*- encoding: utf-8 -*-

Gem::Specification.new do |s|
  s.name = %q{shoulda}
  s.version = "3.1.0"

  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
  s.authors = ["Tammer Saleh", "Joe Ferris", "Ryan McGeary", "Dan Croak", "Matt Jankowski"]
  s.date = %q{2012-07-15 00:00:00.000000000Z}
  s.description = %q{Making tests easy on the fingers and eyes}
  s.email = %q{support@thoughtbot.com}
  s.files = [".autotest", ".gitignore", ".travis.yml", "Appraisals", "CONTRIBUTING.md", "Gemfile", "MIT-LICENSE", "README.md", "Rakefile", "features/rails_integration.feature", "features/step_definitions/rails_steps.rb", "features/support/env.rb", "gemfiles/3.0.gemfile", "gemfiles/3.0.gemfile.lock", "gemfiles/3.1.gemfile", "gemfiles/3.1.gemfile.lock", "gemfiles/3.2.gemfile", "gemfiles/3.2.gemfile.lock", "lib/shoulda.rb", "lib/shoulda/version.rb", "shoulda.gemspec"]
  s.homepage = %q{https://github.com/thoughtbot/shoulda}
  s.require_paths = ["lib"]
  s.rubygems_version = %q{1.3.7}
  s.summary = %q{Making tests easy on the fingers and eyes}
  s.test_files = ["features/rails_integration.feature", "features/step_definitions/rails_steps.rb", "features/support/env.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<shoulda-context>, ["~> 1.0"])
      s.add_runtime_dependency(%q<shoulda-matchers>, ["~> 1.2"])
      s.add_development_dependency(%q<appraisal>, ["~> 0.4.0"])
      s.add_development_dependency(%q<rails>, ["#<YAML::Syck::DefaultKey:0x7f57bcc7bf80> 3.0.12"])
      s.add_development_dependency(%q<sqlite3>, ["~> 1.3.2"])
      s.add_development_dependency(%q<rspec-rails>, ["~> 2.7.0"])
      s.add_development_dependency(%q<cucumber>, ["~> 1.1.0"])
      s.add_development_dependency(%q<aruba>, ["~> 0.4.11"])
    else
      s.add_dependency(%q<shoulda-context>, ["~> 1.0"])
      s.add_dependency(%q<shoulda-matchers>, ["~> 1.2"])
      s.add_dependency(%q<appraisal>, ["~> 0.4.0"])
      s.add_dependency(%q<rails>, ["#<YAML::Syck::DefaultKey:0x7f57bcc7bf80> 3.0.12"])
      s.add_dependency(%q<sqlite3>, ["~> 1.3.2"])
      s.add_dependency(%q<rspec-rails>, ["~> 2.7.0"])
      s.add_dependency(%q<cucumber>, ["~> 1.1.0"])
      s.add_dependency(%q<aruba>, ["~> 0.4.11"])
    end
  else
    s.add_dependency(%q<shoulda-context>, ["~> 1.0"])
    s.add_dependency(%q<shoulda-matchers>, ["~> 1.2"])
    s.add_dependency(%q<appraisal>, ["~> 0.4.0"])
    s.add_dependency(%q<rails>, ["#<YAML::Syck::DefaultKey:0x7f57bcc7bf80> 3.0.12"])
    s.add_dependency(%q<sqlite3>, ["~> 1.3.2"])
    s.add_dependency(%q<rspec-rails>, ["~> 2.7.0"])
    s.add_dependency(%q<cucumber>, ["~> 1.1.0"])
    s.add_dependency(%q<aruba>, ["~> 0.4.11"])
  end
end
WARNING:  Invalid .gemspec format in '/usr/lib/ruby/gems/1.8/specifications/shoulda-3.1.0.gemspec'

*** LOCAL GEMS ***

WARNING:  #<ArgumentError: Illformed requirement ["#<YAML::Syck::DefaultKey:0x7f57bcc7bf80> 3.0.12"]>
# -*- encoding: utf-8 -*-

Gem::Specification.new do |s|
  s.name = %q{shoulda}
  s.version = "3.1.0"

  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
  s.authors = ["Tammer Saleh", "Joe Ferris", "Ryan McGeary", "Dan Croak", "Matt Jankowski"]
  s.date = %q{2012-07-15 00:00:00.000000000Z}
  s.description = %q{Making tests easy on the fingers and eyes}
  s.email = %q{support@thoughtbot.com}
  s.files = [".autotest", ".gitignore", ".travis.yml", "Appraisals", "CONTRIBUTING.md", "Gemfile", "MIT-LICENSE", "README.md", "Rakefile", "features/rails_integration.feature", "features/step_definitions/rails_steps.rb", "features/support/env.rb", "gemfiles/3.0.gemfile", "gemfiles/3.0.gemfile.lock", "gemfiles/3.1.gemfile", "gemfiles/3.1.gemfile.lock", "gemfiles/3.2.gemfile", "gemfiles/3.2.gemfile.lock", "lib/shoulda.rb", "lib/shoulda/version.rb", "shoulda.gemspec"]
  s.homepage = %q{https://github.com/thoughtbot/shoulda}
  s.require_paths = ["lib"]
  s.rubygems_version = %q{1.3.7}
  s.summary = %q{Making tests easy on the fingers and eyes}
  s.test_files = ["features/rails_integration.feature", "features/step_definitions/rails_steps.rb", "features/support/env.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<shoulda-context>, ["~> 1.0"])
      s.add_runtime_dependency(%q<shoulda-matchers>, ["~> 1.2"])
      s.add_development_dependency(%q<appraisal>, ["~> 0.4.0"])
      s.add_development_dependency(%q<rails>, ["#<YAML::Syck::DefaultKey:0x7f57bcc7bf80> 3.0.12"])
      s.add_development_dependency(%q<sqlite3>, ["~> 1.3.2"])
      s.add_development_dependency(%q<rspec-rails>, ["~> 2.7.0"])
      s.add_development_dependency(%q<cucumber>, ["~> 1.1.0"])
      s.add_development_dependency(%q<aruba>, ["~> 0.4.11"])
    else
      s.add_dependency(%q<shoulda-context>, ["~> 1.0"])
      s.add_dependency(%q<shoulda-matchers>, ["~> 1.2"])
      s.add_dependency(%q<appraisal>, ["~> 0.4.0"])
      s.add_dependency(%q<rails>, ["#<YAML::Syck::DefaultKey:0x7f57bcc7bf80> 3.0.12"])
      s.add_dependency(%q<sqlite3>, ["~> 1.3.2"])
      s.add_dependency(%q<rspec-rails>, ["~> 2.7.0"])
      s.add_dependency(%q<cucumber>, ["~> 1.1.0"])
      s.add_dependency(%q<aruba>, ["~> 0.4.11"])
    end
  else
    s.add_dependency(%q<shoulda-context>, ["~> 1.0"])
    s.add_dependency(%q<shoulda-matchers>, ["~> 1.2"])
    s.add_dependency(%q<appraisal>, ["~> 0.4.0"])
    s.add_dependency(%q<rails>, ["#<YAML::Syck::DefaultKey:0x7f57bcc7bf80> 3.0.12"])
    s.add_dependency(%q<sqlite3>, ["~> 1.3.2"])
    s.add_dependency(%q<rspec-rails>, ["~> 2.7.0"])
    s.add_dependency(%q<cucumber>, ["~> 1.1.0"])
    s.add_dependency(%q<aruba>, ["~> 0.4.11"])
  end
end

that may be the issue. Here is my environment.

RubyGems Environment:

  • RUBYGEMS VERSION: 1.3.7
  • RUBY VERSION: 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
  • INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
  • RUBY EXECUTABLE: /usr/bin/ruby
  • EXECUTABLE DIRECTORY: /usr/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86_64-linux
  • GEM PATHS:
    • /usr/lib/ruby/gems/1.8
    • /root/.gem/ruby/1.8
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
  • REMOTE SOURCES:

I'll upgrade to 1.6.2 as I think I am limited to certain rubygem versions.

Upgraded and now get this error:

[root@puppet2 foremancorey]# rake
Invalid gemspec in [/usr/lib64/ruby/gems/1.8/specifications/shoulda-3.1.0.gemspec]: Illformed requirement ["#<YAML::Syck::DefaultKey:0x7f59ceddfd90> 3.0.12"]
Invalid gemspec in [/usr/lib64/ruby/gems/1.8/specifications/shoulda-3.1.0.gemspec]: Illformed requirement ["#<YAML::Syck::DefaultKey:0x7f59ceddfd90> 3.0.12"]
Invalid gemspec in [/usr/lib64/ruby/gems/1.8/specifications/shoulda-3.1.0.gemspec]: Illformed requirement ["#<YAML::Syck::DefaultKey:0x7f59ceddfd90> 3.0.12"]
rake aborted!
Could not find shoulda-3.1.0 in any of the sources

(See full trace by running task with --trace)
[root@puppet2 foremancorey]# gem env
Invalid gemspec in [/usr/lib64/ruby/gems/1.8/specifications/shoulda-3.1.0.gemspec]: Illformed requirement ["#<YAML::Syck::DefaultKey:0x7f59ceddfd90> 3.0.12"]
Invalid gemspec in [/usr/lib64/ruby/gems/1.8/specifications/shoulda-3.1.0.gemspec]: Illformed requirement ["#<YAML::Syck::DefaultKey:0x7f59ceddfd90> 3.0.12"]
RubyGems Environment:
  - RUBYGEMS VERSION: 1.6.2
  - RUBY VERSION: 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
  - INSTALLATION DIRECTORY: /usr/lib64/ruby/gems/1.8
  - RUBY EXECUTABLE: /usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /usr/lib64/ruby/gems/1.8
     - /root/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/
Owner

jferris commented Jul 17, 2012

Looking at stack overflow (http://stackoverflow.com/questions/9004804/invalid-gemspec-illformed-requirement-yamlsyckdefaultkey0xb5f9c990-3) and the Rubygems blog (http://blog.rubygems.org/2011/08/31/shaving-the-yaml-yak.html#disqus_thread) it looks like you'll need something like 1.8.15.

Looking at this more, it seems like 1.8.18+ will build gems that work on older versions of Rubygems, so I tried rebuilding and releasing as 3.1.1. Can you give that version a shot?

Contributor

gabebw commented Jul 29, 2012

@logicminds - any progress on this?

@ghost

ghost commented Jul 31, 2012

I just got this problem in my Rails project with Shoulda 3.1.0. I then added shoulda 3.1.1 to my gemfile and bundled.

The old gemspec was still there, so my system still complained.

I removed the gemspec (might not be the best way to go about it) by running:

rm /Users/kasper/.rvm/gems/ruby-1.8.7-p352@ben2/specifications/shoulda-3.1.0.gemspec

And now it works fine.

Owner

drapergeek commented Oct 19, 2012

Closing this issue due to no activity in a while. If this continues to be an issue please re-open.

@drapergeek drapergeek closed this Oct 19, 2012

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