Fixes for invalid date format specification in gemspec

I’m getting a lot of this issue after install Heroku gem. So I found a solution for it.

The ultimate solution is this:
Search “spec” files in your Ruby directory: *C:\Ruby187\lib\ruby\gems\1.8\specifications*
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.

A faster way is

This will remove the string from the specification file: “sudo find . -type f | sudo xargs perl -pi -e ‘s/ 00:00:00\.000000000Z//'”

Source: http://stackoverflow.com/a/8030586

Advertisements