Monday, November 14, 2011

Invalid gemspec in [/var/lib/gems/1.8/specifications

Environment:
Ubuntu 11.10


Problem:
Invalid gemspec in [/var/lib/gems/1.8/specifications/json-1.6.1.gemspec]: invalid date format in specification: "2011-09-18 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/tilt-1.3.3.gemspec]: invalid date format in specification: "2011-08-25 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/json-1.6.1.gemspec]: invalid date format in specification: "2011-09-18 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/tilt-1.3.3.gemspec]: invalid date format in specification: "2011-08-25 00:00:00.000000000Z"


Solution:
sudo sed -i 's/ 00:00:00.000000000Z//' /var/lib/gems/1.8/specifications/*

Whenever you install some new gem and encounter similar message, just run the script again.

2 comments: