Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

invalid gemspec for 1.2.4 #33

Closed
fugufish opened this Issue · 9 comments

8 participants

@fugufish
Installing execjs (1.2.4) Invalid gemspec in [/Users/jarod/.rvm/gems/ruby-1.9.2-p0@trump/specifications/execjs-1.2.4.gemspec]: invalid date format in specification: "2011-08-03 00:00:00.000000000Z"
/Users/jarod/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:277:in `block in _resort!': undefined method `name' for nil:NilClass (NoMethodError)
    from /Users/jarod/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:276:in `sort!'
    from /Users/jarod/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:276:in `_resort!'
    from /Users/jarod/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:270:in `_all'
    from /Users/jarod/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:402:in `each'
    from /Users/jarod/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:204:in `include?'
    from /Users/jarod/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:204:in `install'
    from /Users/jarod/.rvm/gems/ruby-1.9.2-p0@trump/gems/bundler-1.0.10/lib/bundler/source.rb:96:in `install'
    from /Users/jarod/.rvm/gems/ruby-1.9.2-p0@trump/gems/bundler-1.0.10/lib/bundler/installer.rb:55:in `block in run'
    from /Users/jarod/.rvm/gems/ruby-1.9.2-p0@trump/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in `block in each'
    from /Users/jarod/.rvm/gems/ruby-1.9.2-p0@trump/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in `each'
    from /Users/jarod/.rvm/gems/ruby-1.9.2-p0@trump/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in `each'
    from /Users/jarod/.rvm/gems/ruby-1.9.2-p0@trump/gems/bundler-1.0.10/lib/bundler/installer.rb:44:in `run'
    from /Users/jarod/.rvm/gems/ruby-1.9.2-p0@trump/gems/bundler-1.0.10/lib/bundler/installer.rb:8:in `install'
    from /Users/jarod/.rvm/gems/ruby-1.9.2-p0@trump/gems/bundler-1.0.10/lib/bundler/cli.rb:226:in `install'
    from /Users/jarod/.rvm/gems/ruby-1.9.2-p0@trump/gems/bundler-1.0.10/lib/bundler/vendor/thor/task.rb:22:in `run'
    from /Users/jarod/.rvm/gems/ruby-1.9.2-p0@trump/gems/bundler-1.0.10/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
    from /Users/jarod/.rvm/gems/ruby-1.9.2-p0@trump/gems/bundler-1.0.10/lib/bundler/vendor/thor.rb:246:in `dispatch'
    from /Users/jarod/.rvm/gems/ruby-1.9.2-p0@trump/gems/bundler-1.0.10/lib/bundler/vendor/thor/base.rb:389:in `start'
    from /Users/jarod/.rvm/gems/ruby-1.9.2-p0@trump/gems/bundler-1.0.10/bin/bundle:13:in `<top (required)>'
    from /Users/jarod/.rvm/gems/ruby-1.9.2-p0@trump/bin/bundle:19:in `load'
    from /Users/jarod/.rvm/gems/ruby-1.9.2-p0@trump/bin/bundle:19:in `<main>'
@josh

works for me

$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.0.0]
$ gem build execjs.gemspec 
  Successfully built RubyGem
  Name: execjs
  Version: 1.2.4
  File: execjs-1.2.4.gem
@josh josh closed this
@mwawrusch

Building is not the problem ;)

This is caused by a date problem. Similar issues are here:

http://stackoverflow.com/questions/5771758/invalid-gemspec-because-of-the-date-format-in-specification
http://help.rubygems.org/discussions/problems/680-invalid-gemspec-and-invalid-date-format-in-specification-2011-05-03-000000000000000z
rubygems/rubygems#57

If you look into the generated gemspec you see that versions 1.2.1 and 1.2.0 have this date format
s.date = %q{2011-07-27}
and

s.date = %q{2011-06-17}

while
1.2.4 has

s.date = %q{2011-08-03 00:00:00.000000000Z}

To solve this for the original poster (the gem is fine):

gem update --system
rvm gemset emtpty yourgemsetname
gem install bundler
gem install

This cleans your local installation and it will work fine. For certain gems you might want to add the following to your boot.rb file at the top:

require 'yaml'
YAML::ENGINE.yamler = 'syck'

require 'rubygems'

RMAGICK_BYPASS_VERSION_TEST=true

(I included rmagick for completeness if someone googles this here)

@fugufish

thanks.

@benr75

This should be reopened. Thx mwawrusch

@benr75

My bad. Understand the issue better now. Ignore my previous comment.

@ssoroka

the fix is changing my rubygems version? c'mon, let's get a more legitimate fix.

@weyus

Another option is to just take out the time component directly in the gemspec file. But I think that rubygems itself should be responsible for handling the change in required date format.

@antdude

Weyus: Agreed. I am seeing this problem too much lately. :(

@durrantm

that last 'gem install' you mean 'bundle install' right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.