Problems running example Ruby script

Subscribe to Problems running example Ruby script 2 posts, 2 voices

 
Avatar andyw8 2 posts

When I run the example Ruby script I get the following error:

/Users/andy/dev/rails/heywatch/lib/heywatch/ext.rb:29:in `type_cast!’: undefined method `parse’ for Time:Class (NoMethodError) from /Users/andy/dev/rails/heywatch/lib/heywatch/ext.rb:25:in `each’ from /Users/andy/dev/rails/heywatch/lib/heywatch/ext.rb:25:in `type_cast!’ from /Users/andy/dev/rails/heywatch/lib/heywatch/base.rb:165:in `initialize’ from /Users/andy/dev/rails/heywatch/lib/heywatch/base.rb:126:in `new’ from /Users/andy/dev/rails/heywatch/lib/heywatch/base.rb:126:in `create’ from /Users/andy/dev/rails/heywatch/lib/heywatch/discover.rb:15:in `create’ from ruby.rb:6

I’m on ruby 1.8.6

 
Avatar Bruno Celeste 374 posts

require “time” should solve the problem.