Invalid gemspec because of the date format in specification

2011-11-07 10:14

Invalid gemspec because of the date format in specification

by

at 2011-11-07 02:14:46

original http://hlee.iteye.com/blog/1236965

又是这个date format的错误。

上次出错忘了,记录下来,可好又得查一遍,赶快抄回来。

Invalid gemspec in [/home/ra/.rvm/gems/ruby-1.9.2-p180/specifications/json_pure-1.6.1.gemspec]: invalid date format in specification: "2011-09-18 00:00:00.000000000Z"



总之,问题就是这个格式的时间,认不出来

那么理论上只要

在给出的问题gem包里把
"s.date = %q{2011-05-21 00:00:00.000000000Z}"

改成

"s.date = %q{2011-05-21}"



也有说可以gem update或者再装解决

我比较推荐

/home/user/.rvm/gems/ruby-1.9.2-p180/specifications/

grep -i .gemspec -e '.s.date.=.%q{(....-..-..) (.Z)}



或者

sed -i -e 's/(.)s.date.=.%q{(....-..-..) (.Z)}/\1s.date = %q{\2}/p' ./.gemspec

shell脚本多文件替换,方便快捷

          <br><br>
          <span style="color:red">
            <a href="http://hlee.iteye.com/blog/1236965#comments" style="color:red">已有 <strong>1</strong> 人发表留言,猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br><br><br>

ITeye推荐