问题 每当宝石抛出“无法从时间迭代”错误


我在用着 每当宝石  对于crone工作,但是当我运行它时:

cd ~/my_project
whenever

我收到错误

/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)

我在跑

ruby-2.0.0-rc1和 轨道3.2.12


2523
2018-02-14 17:14


起源



答案:


错误是由 慢性 宝石(a 每当宝石 依赖):它正在碰撞 Ruby 2。你可以用简单的方法解决它 bundle update whenever chronic 你会得到最新的非碰撞版本。

将来,如果您需要在新版慢性版正式发布之前修复,请指出您的 Gemfile 直接在git repo:

gem 'chronic', :git => 'git@github.com:mojombo/chronic.git'
gem 'whenever'

15
2018-02-14 17:14



慢性已更新,所以不再需要:) - David Morales
bundle update whenever chronic 现在将处理它,因为慢性释放固定的宝石 - Daniel Evans
导致与Ruby 2冲突的代码中发生了什么? - Weiser


答案:


错误是由 慢性 宝石(a 每当宝石 依赖):它正在碰撞 Ruby 2。你可以用简单的方法解决它 bundle update whenever chronic 你会得到最新的非碰撞版本。

将来,如果您需要在新版慢性版正式发布之前修复,请指出您的 Gemfile 直接在git repo:

gem 'chronic', :git => 'git@github.com:mojombo/chronic.git'
gem 'whenever'

15
2018-02-14 17:14



慢性已更新,所以不再需要:) - David Morales
bundle update whenever chronic 现在将处理它,因为慢性释放固定的宝石 - Daniel Evans
导致与Ruby 2冲突的代码中发生了什么? - Weiser


你需要更新 whenever 处理Ruby 2。

bundle update whenever

0
2018-06-20 00:05