【发布时间】:2012-08-02 04:29:20
【问题描述】:
我正在使用 ActiveAdmin,capistrano 进行部署,thinkng_sphinx 进行搜索,delayed_job 在添加新记录后自动为 ts 运行 reindex。
部分来自我的 deploy.rb
before 'deploy:update_code', 'thinking_sphinx:stop'
after 'deploy:update', 'thinking_sphinx:index', 'thinking_sphinx:start'
after 'deploy:finalize_update', 'sphinx:symlink_indexes', "delayed_job:stop", "delayed_job:start"
问题是在部署期间运行此命令时
executing "RAILS_ENV=production /.../current/script/delayed_job stop"
我明白了
/.../shared/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:503:in `load_missing_constant'
Expected /.../releases/20120804075838/app/admin/users.rb to define Users (LoadError)
from /.../shared/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:192:in `block in const_missing'
...
这里是 app/admin/users.rb
ActiveAdmin.register ::User do
index do
column :name
column "E-mail", :email
end
end
我试图将 app/admin/users.rb 重命名为 app/admin/user.rb - 什么都没有
但如果我只从服务器命令行运行:
RAILS_ENV=production script/delayed_job stop
一切正常
来自我的 Gemfile
gem 'delayed_job'
gem 'delayed_job_active_record'
gem 'daemons'
gem 'thinking-sphinx'
gem 'ts-delayed-delta', :require => 'thinking_sphinx/deltas/delayed_delta'
思考狮身人面像 (2.0.12) ts-delayed-delta (1.1.2) 延迟作业(3.0.3) delay_job_active_record (0.3.2) 活跃管理员(0.4.4)
【问题讨论】:
标签: ruby-on-rails capistrano delayed-job activeadmin thinking-sphinx