Invalid date format specification in gemspec

后端 未结 18 2037
野性不改
野性不改 2020-12-04 09:47

I am getting the following error when I try to use gems in windows, and I also referred to this stackoverflow post and updated rubygems and rails. But nothing could solve t

相关标签:
18条回答
  • 2020-12-04 10:02

    I've too many gems to fix one by one, and try both update_rubygems and gem pristine --all still no luck.

    So I use rvm clear gemset to remove all gems with wrong gemspec. Execute bundle install to reinstall all the gems, and Viola!

    0 讨论(0)
  • 2020-12-04 10:06

    I have fixed this issue 'invalid date formate specification' by, changing the corresponding line in D:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/specifications/tilt-1.3.3.gemspec by putting s.date =Time.now instead of s.date = "2011-08-25 00:00:00.000000000Z" The same can be use the other files too.

    0 讨论(0)
  • 2020-12-04 10:07

    "gem install rubygems-update", "update_rubygems", then "gem pristine --all" is the combination that solved the problem for me after none of the previously listed ones worked.

    0 讨论(0)
  • 2020-12-04 10:09

    I have fixed this issue by upgrading my RubyGems to 1.8.10 with

    gem update --system
    

    Edit: You can also try (as suggested by ZeissS)

    gem install rubygems-update
    update_rubygems
    
    0 讨论(0)
  • 2020-12-04 10:09

    In addition to running gem update --system I used gem install <gem with bad gemspec> on each of the item gem env reported as bad. This cleaned up the errors on my machine.

    0 讨论(0)
  • 2020-12-04 10:09

    Had the same problem when trying to install a GEM on Ubuntu 11.10.

    Invalid gemspec in [/var/lib/gems/1.8/specifications/svn2git-2.1.2.gemspec]: invalid date format in specification: "2011-12-28 00:00:00.000000000Z"
    

    The above options did not work for me. gem env reported the following:

    RubyGems Environment:
      - RUBYGEMS VERSION: 1.7.2
      - RUBY VERSION: 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]
    

    So I presumed this problem was due to the fact I required a newer version of RubyGems installed.

    Issuing gem update --system yeilded the following warning:

    ERROR:  gem update --system is disabled on Debian, because it will overwrite the content of the rubygems Debian package, and might break your Debian system in subtle ways. The Debian-supported way to update rubygems is through apt-get, using Debian official repositories.
    If you really know what you are doing, you can still update rubygems by setting the REALLY_GEM_UPDATE_SYSTEM environment variable, but please remember that this is completely unsupported by Debian.
    

    However I was finally able to update rubygems to 1.8.15 by issuing:

    sudo gem install rubygems-update && update_rubygems
    

    Everything worked after that, good luck! :)

    0 讨论(0)
提交回复
热议问题