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

2

11

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

Antilogy answered 14/2, 2013 at 17:14 Comment(0)
A
15

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'
Antilogy answered 14/2, 2013 at 17:14 Comment(2)
bundle update whenever chronic will handle it now, since chronic released a fixed gemHerra
What was happening in the code that caused the collision with Ruby 2?Amundson
E
0

You need to update whenever to handle Ruby 2.

bundle update whenever
Econometrics answered 20/6, 2014 at 0:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.