Posts from January 2013

Most Recent from January 2013

Time.parse undefined method error in Ruby

You may get this error when trying to use Time.parse in a Ruby script:

undefined method `parse' for Time:Class (NoMethodError)

If so, try adding this line to the top of your script:

require ...
*

Using Time.parse in Ruby

There are some Time extension methods, for example Time.parse, which are not automatically imported into Ruby scripts as part of the standard library. To use these methods you probably need to add this line to the top of your script:

requi...
*