使用gem来管理我的Rails 3.2.13应用程序的cron作业。 与Capistrano一起部署。
以下是我在outpout中得到的结果:
/home/marcele/.rvm/gems/ruby-2.0.0-p247@models/gems/capistrano-2.15.5/lib/capistrano/configuration/loading.rb:18:in `instance': Please require this file from within a Capistrano recipe (LoadError)
from /home/marcele/.rvm/gems/ruby-2.0.0-p247@models/gems/whenever-0.8.3/lib/whenever/capistrano/recipes.rb:3:in `<top (required)>'
from /home/marcele/.rvm/gems/ruby-2.0.0-p247@models/gems/whenever-0.8.3/lib/whenever/capistrano.rb:1:in `require'
from /home/marcele/.rvm/gems/ruby-2.0.0-p247@models/gems/whenever-0.8.3/lib/whenever/capistrano.rb:1:in `<top (required)>'
from ./config/deploy.rb:62:in `require'
deploy.rb recipe在这里结束了(不管是头):https://gist.github.com/Almaron/5989804。 如果我删除第61和62行提到的话,它可以正常工作。
答案 0 :(得分:0)
发现问题 - 睡眠不足。 将require语句移出命名空间,一切都很好。