I am getting the following error when I try to use gems in windows, and I also referred to this stackoverflow post and updated rubygems and rails. But nothing could solve t
This is not really an answer but if somebody feels like digging more I found this gemspec spec here: http://rubygems.rubyforge.org/rubygems-update/Gem/Specification.html (scroll down to date=date() and click to show source):
@date = case date
when String then
if %r\A(\d{4})-(\d{2})-(\d{2})\Z/ =~ date then
Time.utc($1.to_i, $2.to_i, $3.to_i)
else
raise(Gem::InvalidSpecificationException,
"invalid date format in specification: #{date.inspect}")
end
when Time, Date then
Time.utc(date.year, date.month, date.day)
else
TODAY
end
So I guess this is the code that parses that gemspec, and it just looks like the date format that are in the files that show errors don't conform to this.
What I did was to just manually fix those offending gemspecs as suggested above (changing the dates to "yyyy-mm-dd", it works for me.
All the rubygem specs I had that had this problem also has a line
s.rubygems_version = %q{1.3.5}
So I'm guessing these are just old gems? And what's with those %q{...} anyway?
If you had this error on Ubuntu 11.04 my solution was the following command lines:
$ sudo apt-get install ruby1.9.1
After doing this you will not get the date error.
I just had the same problem on my ubuntu after upgrading to 10.10. None of the above worked for me. I had to install the update_rubygems script from http://rubygems.org/pages/download and run it once. Afterwords everything worked.
rvm gemset clear
and then bundle install
worked for me!
Solved by running gem update --system
then gem update
.
The various solutions noted in these answers did not work for me. What did work was re-installing the specific versions of the offending gem's. In your case that would of looked like:
gem install tilt -v 1.3.3
gem install execjs -v 1.2.4
gem install temple -v 0.3.3
gem install guard -v 0.6.3
gem install guard-livereload -v 0.3.1
gem install rack-cache -v 1.0.3
I think that gem pristine xxx yyy zzz
or gem pristine --all
might not be going out always (ever?) to the gem repositories whereas gem install xxx -v v.r.m
does.
Anyway, re-installing the offending versions of the gems worked for me, although it was tedious...