throws Invalid Date error only within Rails

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

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?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs