invalid gemspec and invalid date format in specification: "2011-05-03 00:00:00.000000000Z"

ginost7's Avatar

ginost7

28 Jul, 2011 12:40 PM

hello

gino@gino-laptop:~$ ruby -v
ruby 1.8.8dev (2010-10-01) [i686-linux]

I seem to get this error repeatedly:

gino@gino-laptop:~$ rails -v
Invalid gemspec in [/usr/local/lib/ruby/gems/1.8/specifications/merb_datamapper-1.1.3.gemspec]: invalid date format in specification: "2011-05-03 00:00:00.000000000Z"
Rails 3.0.9

when i create a new project i tend to get the same error

gino@gino-laptop:~/railsDEV$ rails new testerror
Invalid gemspec in [/usr/local/lib/ruby/gems/1.8/specifications/merb_datamapper-1.1.3.gemspec]: invalid date format in specification: "2011-05-03 00:00:00.000000000Z"

  create  
  create  README
  create  Rakefile
  create  config.ru
  create  .gitignore.......................
  .................................................
  .........................................................

Could someone please give me an idea how to solve it?

  1. 2 Posted by ginost7 on 28 Jul, 2011 12:51 PM

    ginost7's Avatar

    I uninstalled the merb_datamapper as shown below BUT I STLL GET THE ERROR

    gino@gino-laptop:~/railsDEV$ sudo gem uninstall merb_datamapper
    [sudo] password for gino: Invalid gemspec in [/usr/local/lib/ruby/gems/1.8/specifications/merb_datamapper-1.1.3.gemspec]: invalid date format in specification: "2011-05-03 00:00:00.000000000Z"
    Invalid gemspec in [/usr/local/lib/ruby/gems/1.8/specifications/merb_datamapper-1.1.3.gemspec]: invalid date format in specification: "2011-05-03 00:00:00.000000000Z"

    You have requested to uninstall the gem:

    merb_datamapper-1.1.2
    

    merb-1.1.3 depends on [merb_datamapper (~> 1.1)]
    If you remove this gems, one or more dependencies will not be met.
    Continue with Uninstall? [Yn] Y
    Successfully uninstalled merb_datamapper-1.1.2
    gino@gino-laptop:~/railsDEV$ gem list
    Invalid gemspec in [/usr/local/lib/ruby/gems/1.8/specifications/merb_datamapper-1.1.3.gemspec]: invalid date format in specification: "2011-05-03 00:00:00.000000000Z"

  2. Support Staff 3 Posted by Nick Quaranto on 29 Jul, 2011 03:35 PM

    Nick Quaranto's Avatar

    Not sure what's up with this, but it might be because you're using 1.8.8. I would suggest sticking with 1.8.7 or 1.9.2. Also, if you use RVM it's easier to isolate and recover from these problems (make a gemset, blow it away if one gem is bad)

  3. 4 Posted by Martin Wawrusch on 05 Aug, 2011 07:48 AM

    Martin Wawrusch's Avatar

    It is a problem with the YAML parser used, either syck or psych have troubles reading that date format. It has been popping up all over the place for me recently.

  4. 5 Posted by gino ahmad on 05 Aug, 2011 10:24 AM

    gino ahmad's Avatar

    Could you please explain how i could fix the YAML parser. Sorry im new to
    rails

    gino

  5. 6 Posted by Martin Wawrusch on 05 Aug, 2011 10:27 AM

    Martin Wawrusch's Avatar

    Take a look at my reply here:

    https://github.com/sstephenson/execjs/issues/33#issuecomment-1733646

    the bottom half of my comment explains what you need to do to get this working.

  6. Support Staff 7 Posted by Nick Quaranto on 18 Dec, 2011 08:11 PM

    Nick Quaranto's Avatar

    We fixed a lot of these bad YAML/gemspec issues...is this still happening anyone?

  7. 8 Posted by mattotto on 22 Dec, 2011 01:49 PM

    mattotto's Avatar

    I just ran into this error today while moving from RVM to rbenv using 1.9.2p290 and rubygems 1.8.13.

    After running bundle install with bundler installing the gems to the project's vendor directory, when I run bundle exec, the following gems gave me this error:
    term-ansicolor-1.0.7
    tilt-1.3.3
    rack-cache-1.0.3
    jquery-rails-1.0.19

    If you need more information let me know. I'd be happy to help, just not sure where to start.

  8. Support Staff 9 Posted by Luis Lavena on 22 Dec, 2011 02:56 PM

    Luis Lavena's Avatar

    You can solve that by doing two things:

    1) Update bundler to latest version

    2) Perform `gem pristine <gemname>` to restore the gemspec of each of
    the faulty gems.

    E.g.:

    gem pristine term-ansicolor tilt rack-cache jquery-rails

    HTH,

  9. 10 Posted by Eric Cunningham on 09 Feb, 2012 02:54 AM

    Eric Cunningham's Avatar

    Yes this error is still happening in spades. In fact, I got the error for gemcutter:
    Invalid gemspec in [/var/lib/gems/1.8/specifications/gemcutter-0.7.1.gemspec]: invalid date format in specification: "2011-12-02 00:00:00.000000000Z" I read that I should update my version of rubygems, but when I typed in "gem update --system" It told me that I shouldn't update using that command because it would mess-up my debian. So I used "apt-get", and it told me I have the latest version.

    So in other words, if you install ubuntu with the latest copies of rubygems and gemcutter, you'll get an error.

  10. Support Staff 11 Posted by Eric Hodel on 09 Feb, 2012 07:15 PM

    Eric Hodel's Avatar

    Unfortunately gem pristine won't fix this since pristine only fixes installed gems and due to the invalid gemspec, RubyGems doesn't think the gem is installed.

    gem install gemcutter -v 0.7.1 will fix your problem.

  11. Eric Hodel closed this discussion on 09 Feb, 2012 07:15 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

29 Aug, 2014 06:23 PM
28 Aug, 2014 07:18 PM
27 Aug, 2014 12:03 PM
26 Aug, 2014 07:09 PM
26 Aug, 2014 07:07 PM