Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
693 views
in Technique[技术] by (71.8m points)

ruby on rails - Invalid date format specification in gemspec

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 the problem.

The following is the complete error,

    D:>gem env
Invalid gemspec in [D:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/specifications
/tilt-1.3.3.gemspec]: invalid date format in specification: "2011-08-25 00:00:00
.000000000Z"
Invalid gemspec in [D:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/specifications
/execjs-1.2.4.gemspec]: invalid date format in specification: "2011-08-03 00:00:
00.000000000Z"
Invalid gemspec in [D:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/specifications
/temple-0.3.3.gemspec]: invalid date format in specification: "2011-08-26 00:00:
00.000000000Z"
Invalid gemspec in [D:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/specifications
/guard-0.6.3.gemspec]: invalid date format in specification: "2011-09-01 00:00:0
0.000000000Z"
Invalid gemspec in [D:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/specifications
/guard-livereload-0.3.1.gemspec]: invalid date format in specification: "2011-09
-01 00:00:00.000000000Z"
Invalid gemspec in [D:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/specifications
/rack-cache-1.0.3.gemspec]: invalid date format in specification: "2011-08-27 00
:00:00.000000000Z"
Invalid gemspec in [D:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/specifications
/tilt-1.3.3.gemspec]: invalid date format in specification: "2011-08-25 00:00:00
.000000000Z"
Invalid gemspec in [D:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/specifications
/execjs-1.2.4.gemspec]: invalid date format in specification: "2011-08-03 00:00:
00.000000000Z"
Invalid gemspec in [D:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/specifications
/temple-0.3.3.gemspec]: invalid date format in specification: "2011-08-26 00:00:
00.000000000Z"
Invalid gemspec in [D:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/specifications
/guard-0.6.3.gemspec]: invalid date format in specification: "2011-09-01 00:00:0
0.000000000Z"
Invalid gemspec in [D:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/specifications
/guard-livereload-0.3.1.gemspec]: invalid date format in specification: "2011-09
-01 00:00:00.000000000Z"
Invalid gemspec in [D:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/specifications
/rack-cache-1.0.3.gemspec]: invalid date format in specification: "2011-08-27 00
:00:00.000000000Z"
RubyGems Environment:
  - RUBYGEMS VERSION: 1.7.2
  - RUBY VERSION: 1.8.7 (2011-06-30 patchlevel 352) [i386-mingw32]
  - INSTALLATION DIRECTORY: D:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: D:/RailsInstaller/Ruby1.8.7/bin/ruby.exe
  - EXECUTABLE DIRECTORY: D:/RailsInstaller/Ruby1.8.7/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-mingw32
  - GEM PATHS:
     - D:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8
     - C:/Documents and Settings/jeygokul/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The ultimate solution is this:

Search "spec" files in your Ruby directory: *C:Ruby187lib ubygems1.8specifications*

If a gemspec file contains something like this: s.date = %q{2011-10-13 00:00:00.000000000Z} Then delete the 00:00:00.000000000Z part: s.date = %q{2011-10-13}

After saving those gemspec files, the problem is solved.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...