Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

whenever gem is throwing "can't iterate from Time" error

I'm using whenever gem for crone job but when I run it :

cd ~/my_project
whenever

I get error

/home/tomi/.rvm/gems/ruby-2.0.0-rc1@my_projcet/bundler/gems/rails-d1904aff6f04/activesupport/lib/active_support/core_ext/range/include_range.rb:16:in `each': can't iterate from Time (TypeError)

I'm running

ruby-2.0.0-rc1 and rails 3.2.12

like image 660
equivalent8 Avatar asked Feb 14 '13 17:02

equivalent8


1 Answers

The error was caused by chronic gem (a whenever gem dependency): it was colliding with Ruby 2. You can solve it with a simple bundle update whenever chronic and you'll get the latest, non-colliding version.

In the future, if you need a fix before a new version of Chronic is officially released, point your Gemfile directly at the git repo:

gem 'chronic', :git => '[email protected]:mojombo/chronic.git'
gem 'whenever'
like image 100
equivalent8 Avatar answered Sep 24 '22 11:09

equivalent8