Date.today throws Invalid Date error only within Rails

I have a weird problem. I have this code in a helper class to the
view:

today=Date.today

and this throws an exception with the message “invalid date” and the
stack trace being:

/usr/local/lib/ruby/1.8/Date.rb:591:in new0' /usr/local/lib/ruby/1.8/date.rb:703:intoday’

Of course, this works outside Rails. Any suggestions why this happens
inside Rails?