Invalid gemspec because of the date format in specification

后端 未结 15 1134
悲&欢浪女
悲&欢浪女 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:22

    This is more of a comment to ben hall's answer, but i dont have that privilege yet it seems

    gem updates didn't seem to work, im thinking it can't even load the gem because of the bad date format. manually changing the dates was too frustrating to go one by one, so a grep:

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

    And for sed:

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

    And at your own risks!! I'm still a sed newbie, but it worked for me ;)

提交回复
热议问题