Invalid gemspec because of the date format in specification

后端 未结 15 1045
悲&欢浪女
悲&欢浪女 2020-11-28 01:41

When I include a gem that I made, thanks to Bundler (version 1.0.12), in a Gemfile and then I try to bundle or to rake just like that:

$ rake

I\

相关标签:
15条回答
  • 2020-11-28 02:04

    Had this problem still now. Updating Rubygems solved it fine:

    gem update --system
    
    0 讨论(0)
  • 2020-11-28 02:09

    Please notice the comment from Damian Nowak. These commands do possibly mess up your rubygems!

    On Ubuntu 11.10 the following solved this error:

    sudo gem install rubygems-update
    sudo update_rubygems     
    

    The following may work on some systems but not on Debian based:

    sudo gem update --system
    
    0 讨论(0)
  • 2020-11-28 02:10

    (Until the bug fix gets into a stable release of Rubygems) I solved it by reinstalling the same version of any warning-generating gems using the --version switch of the gem command.

    0 讨论(0)
  • 2020-11-28 02:12

    This is my environment:

    RubyGems Environment:
    - RUBYGEMS VERSION: 1.8.10
    - RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [x86_64-darwin11.1.0]
    - INSTALLATION DIRECTORY: /Users/user/.rvm/gems/ruby-1.9.2-p290@app
    - RUBY EXECUTABLE: /Users/user/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
    - EXECUTABLE DIRECTORY: /Users/user/.rvm/gems/ruby-1.9.2-p290@app/bin
    - RUBYGEMS PLATFORMS:
      - ruby
      - x86_64-darwin-11
    - GEM PATHS:
       - /Users/user/.rvm/gems/ruby-1.9.2-p290@app
       - /Users/user/.rvm/gems/ruby-1.9.2-p290@global
    - GEM CONFIGURATION:
       - :update_sources => true
       - :verbose => true
       - :benchmark => false
       - :backtrace => false
       - :bulk_threshold => 1000
    - REMOTE SOURCES:
       - http://rubygems.org/
    

    I finally managed to find a cause / a way to prevent these errors on my system. I just revert to cucumber and cucumber-rails version 1.0.2. Using the latest versions was doing this...

    0 讨论(0)
  • 2020-11-28 02:13

    You may upgraded your gem. To fix this you can edit the gemspecfile directly - from

    2011-04-21 00:00:00.000000000Z
    

    to

    YYYY-MM-DD
    

    Or upgrade your rails also

    sudo gem update rails
    

    It will fix the issue.

    0 讨论(0)
  • 2020-11-28 02:15

    As Ben Hall said, you must fix the gemspec file that may change for system to system. To know what file is see what file is tell in the error report, for example:

    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"

    In this example you must edit "/var/lib/gems/1.8/specifications/svn2git-2.1.2.gemspec" file and change "2011-12-28 00:00:00.000000000Z" for "2011-12-28" in s.date option.

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