gpt4 book ai didi

ruby-on-rails - gemspec 中的无效日期格式规范

转载 作者:太空宇宙 更新时间:2023-11-03 16:56:45 25 4
gpt4 key购买 nike

当我尝试在 Windows 中使用 gems 时出现以下错误,我还提到了 this stackoverflow post并更新了 ruby​​gems 和 rails。但没有什么能解决问题。

下面是完整的错误,

    D:\>gem envInvalid 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:00.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:00.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/

最佳答案

最终的解决方案是这样的:

在您的 Ruby 目录中搜索“spec”文件:*C:\Ruby187\lib\ruby\gems\1.8\specifications*

如果一个 gemspec 文件包含这样的东西: s.date = %q{2011-10-13 00:00:00.000000000Z}然后删除00:00:00.000000000Z部分: s.date = %q{2011-10-13}

保存那些gemspec文件后,问题就解决了。

关于ruby-on-rails - gemspec 中的无效日期格式规范,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7642494/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com