由于规范中的日期格式,gemspec 无效 [英] Invalid gemspec because of the date format in specification

查看:25
本文介绍了由于规范中的日期格式,gemspec 无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在 Gemfile 中包含我制作的 gem 时,感谢 Bundler(版本 1.0.12),然后我尝试像这样捆绑或耙:

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

我收到此错误消息:

Invalid gemspec in [/Users/zagzag/.rvm/gems/ruby-1.9.2-p180@foobar/specifications/myplugin-1.0.0.gemspec]: invalid date format in specification: "2011-04-21 00:00:00.000000000Z"

我在最后一个 Mac OS X (10.6.4) 上,使用:

I'm on the last Mac OS X (10.6.4), with:

$ ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.4.0]

和:

$ gem -v
Invalid gemspec in [/Users/zagzag/.rvm/gems/ruby-1.9.2-p180@foobar/specifications/myplugin-1.0.0.gemspec]: invalid date format in specification: "2011-04-21 00:00:00.000000000Z"
1.7.2

我真的不知道如何解决这个问题.感谢您的任何想法.

I really don't see how to solve this issue. Thanks for any ideas.

推荐答案

这里是我修复invalid date format in specification"错误的方法:

Here is the way I fix the "invalid date format in specification" error:

1.) 转到位于以下位置的规范文件夹:

1.) Go to the specifications folder located at:

/usr/local/lib/ruby/gems/1.8/specifications/

2.) 找出导致问题的规范.

2.) Find the spec that is causing the problem.

3.) 将 s.date = %q{2011-05-21 00:00:00.000000000Z} 更改为 s.date = %q{2011-05-21}

3.) Change s.date = %q{2011-05-21 00:00:00.000000000Z} to s.date = %q{2011-05-21}

这对我来说是一个胜利!祝你好运

That's a WIN for me! Good Luck

这篇关于由于规范中的日期格式,gemspec 无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆