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

有帮助吗?

解决方案

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 => 'git@github.com:mojombo/chronic.git'
gem 'whenever'

其他提示

You need to update whenever to handle Ruby 2.

bundle update whenever
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top