0

使用无论何时 gem 来管理我的 Rails 3.2.13 应用程序的 cron 作业。使用 Capistrano 进行部署。

这是我在输出中得到的:

/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 收据在这里(没有头):https ://gist.github.com/Almaron/5989804 。如果我删除第 61 行和第 62 行提及,它工作正常。

4

1 回答 1

0

发现问题 - 睡眠不足。将 require 语句移出命名空间,一切都很好。

于 2013-07-14T08:31:25.420 回答