有一个调用的 cron 工作
cd /Users/me/rails/current && bundle exec rake ts:rebuild >> /Users/me/log/sphinx_index.log
任务调用适当的释放。遍历所有索引,遍历所有分数,声明“已成功启动(pid 53801)。”
运行搜索并得到不幸的消息:
0:Fixnum 的未定义方法“constantize”
手动进入应用程序的目录并启动 rake ts:rebuild(有和没有 bundle exec),将应用程序返回到它的快乐状态。
我看到的唯一区别是手动任务返回:
WARNING: 'require 'rake/rdoctask'' is deprecated. Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead.
at /Users/me/rails/shared/bundle/ruby/1.8/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
DEPRECATION WARNING: Rake tasks in vendor/plugins/criteriaquery/tasks are deprecated. Use lib/tasks instead. (called from /Users/me/rails/shared/bundle/ruby/1.8/gems/rails-2.3.10/lib/tasks/rails.rb:10)
而日志文件没有提到这一点。
考虑到手头未解决的问题,在 rails3 下为其他应用程序设置 cron 作业的尝试也失败了,但没有认真调查。
完整的堆栈跟踪如下:
/Users/its/rails/shared/bundle/ruby/1.8/gems/thinking-sphinx-1.5.0/lib/thinking_sphinx/search.rb:982:in class_from_crc'
/Users/its/rails/shared/bundle/ruby/1.8/gems/thinking-sphinx-1.5.0/lib/thinking_sphinx/search.rb:961:in
instances_from_matches' /Users/its/rails/shared/bundle/ruby /1.8/gems/activesupport-2.3.10/lib/active_support/ordered_hash.rb:115:in each'
/Users/its/rails/shared/bundle/ruby/1.8/gems/activesupport-2.3.10/lib/active_support/ordered_hash.rb:115:in
each' /Users/its/rails/shared/bundle/ruby/1.8/gems/thinking-sphinx-1.5.0/lib /thinking_sphinx/search.rb:959:in instances_from_matches'
/Users/its/rails/shared/bundle/ruby/1.8/gems/thinking-sphinx-1.5.0/lib/thinking_sphinx/search.rb:465:in
compose_results' /Users/its/rails/shared/bundle/ruby/1.8/gems/thinking-sphinx-1.5.0/lib/thinking_sphinx/search.rb:442:in populate'
/Users/its/rails/shared/bundle/ruby/1.8/gems/thinking-sphinx-1.5.0/lib/thinking_sphinx/search.rb:603:in
call' /Users/its/rails/shared/bundle/ruby/1.8/gems/thinking-sphinx-1.5.0/lib/thinking_sphinx/search.rb:603:in retry_on_stale_index'
/Users/its/rails/shared/bundle/ruby/1.8/gems/thinking-sphinx-1.5.0/lib/thinking_sphinx/search.rb:419:in
populate' /Users/its/rails/shared/bundle/ruby /1.8/gems/thinking-sphinx-1.5.0/lib/thinking_sphinx/search.rb:286:intotal_entries'
/Users/its/rails/releases/20130829144322/app/views/ricerca/risultati.html.erb:1:in
_run_erb_app47views47ricerca47risultati46html46erb' /Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_view/renderable.rb:34:in send'
/Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_view/renderable.rb:34:in
render' /Users/its/rails/shared/bundle/ruby /1.8/gems/actionpack-2.3.10/lib/action_view/base.rb:306:in with_template'
/Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_view/renderable.rb:30:in
render' /Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_view /template.rb:205:in render_template'
/Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_view/base.rb:265:in
render' /Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_view/base.rb:348:in _render_with_layout'
/Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_view/base.rb:262:in
render' /Users/its /rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_controller/base.rb:1252:in render_for_file'
/Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_controller/base.rb:936:in
render_without_benchmark' /Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack -2.3.10/lib/action_controller/benchmarking.rb:51:inrender'
/Users/its/rails/shared/bundle/ruby/1.8/gems/activesupport-2.3.10/lib/active_support/core_ext/benchmark.rb:17:in
ms' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/benchmark.rb:308:in realtime'
/Users/its/rails/shared/bundle/ruby/1.8/gems/activesupport-2.3.10/lib/active_support/core_ext/benchmark.rb:17:in
ms' /Users/its/rails/shared/bundle/ruby/1.8/gems /actionpack-2.3.10/lib/action_controller/benchmarking.rb:51:in render'
/Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_controller/base.rb:1328:in
default_render' /Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_controller/base.rb :1334:in perform_action_without_filters'
/Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_controller/filters.rb:617:in
call_filters'/Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_controller/filters.rb :610:in perform_action_without_benchmark'
/Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_controller/benchmarking.rb:68:in
perform_action_without_rescue'/Users/its/rails/shared /bundle/ruby/1.8/gems/activesupport-2.3.10/lib/active_support/core_ext/benchmark.rb:17:in ms'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/benchmark.rb:308:in
realtime' /Users/its/rails/shared/bundle/ruby/1.8/gems/activesupport-2.3 .10/lib/active_support/core_ext/benchmark.rb:17:inms'
/Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_controller/benchmarking.rb:68:in
perform_action_without_rescue' /Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_controller/rescue.rb:160:in perform_action_without_flash'
/Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_controller/flash.rb:151:in
perform_action' /Users/its/rails/shared/bundle/ruby /1.8/gems/actionpack-2.3.10/lib/action_controller/base.rb:532:in send'
/Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_controller/base.rb:532:in
process_without_filters' /Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_controller /filters.rb:606:in process'
/Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_controller/base.rb:391:in
process' /Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_controller/base.rb:386:in call'
/Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_controller/routing/route_set.rb:438:in
call' /Users/its /rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_controller/dispatcher.rb:87:in dispatch'
/Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_controller/dispatcher.rb:121:in
_call' /Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack -2.3.10/lib/action_controller/dispatcher.rb:130:inbuild_middleware_stack'
/Users/its/rails/shared/bundle/ruby/1.8/gems/activerecord-2.3.10/lib/active_record/query_cache.rb:29:in
调用'/Users/its/rails/shared/bundle/ruby/1.8/gems/activerecord-2.3.10/lib/active_record/query_cache.rb:29:in call'
/Users/its/rails/shared/bundle/ruby/1.8/gems/activerecord-2.3.10/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in
cache'/Users/its/rails/shared/bundle/ruby /1.8/gems/activerecord-2.3.10/lib/active_record/query_cache.rb:9:in cache'
/Users/its/rails/shared/bundle/ruby/1.8/gems/activerecord-2.3.10/lib/active_record/query_cache.rb:28:in
call' /Users/its/rails/shared/bundle/ruby/1.8/gems/activerecord-2.3.10/lib/active_record /connection_adapters/abstract/connection_pool.rb:361:in call'
/Users/its/rails/shared/bundle/ruby/1.8/gems/warden-0.10.7/lib/warden/manager.rb:35:in
call' /Users/its/rails/shared/bundle/ruby/1.8/gems/warden-0.10.7/lib/warden/manager.rb:34:in catch'
/Users/its/rails/shared/bundle/ruby/1.8/gems/warden-0.10.7/lib/warden/manager.rb:34:in
call' /Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_controller/string_coercion.rb:25:in call'
/Users/its/rails/shared/bundle/ruby/1.8/gems/rack-1.1.3/lib/rack/head.rb:9:in
call' /Users/its/rails/shared/bundle/ruby/1.8 /gems/rack-1.1.3/lib/rack/methodoverride.rb:24:incall'
/Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_controller/params_parser.rb:15:in
调用'/Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_controller/session/cookie_store.rb:100:in call'
/Users/its/rails/shared/bundle/ruby/1.8/bundler/gems/devise-efc42d7662f3/lib/devise/rails/warden_compat.rb:43:in
call'/Users/its/rails/shared/bundle /ruby/1.8/gems/actionpack-2.3.10/lib/action_controller/failsafe.rb:26:in call'
/Users/its/rails/shared/bundle/ruby/1.8/gems/rack-1.1.3/lib/rack/lock.rb:11:in
call' /Users/its/rails/shared/bundle/ruby/1.8/gems/rack-1.1.3/lib /rack/lock.rb:11:in synchronize'
/Users/its/rails/shared/bundle/ruby/1.8/gems/rack-1.1.3/lib/rack/lock.rb:11:in
call' /Users/its/rails/shared/bundle/ruby/1.8/gems/actionpack-2.3.10/lib/action_controller/dispatcher.rb:106:in call'
/Library/Ruby/Gems/1.8/gems/passenger-3.0.7/lib/phusion_passenger/rack/request_handler.rb:96:in
process_request' /Library /Ruby/Gems/1.8/gems/passenger-3.0.7/lib/phusion_passenger/abstract_request_handler.rb:513:in accept_and_process_next_request'
/Library/Ruby/Gems/1.8/gems/passenger-3.0.7/lib/phusion_passenger/abstract_request_handler.rb:274:in
main_loop' /Library/Ruby/Gems/1.8/gems/passenger-3.0.7/lib/phusion_passenger/classic_rails /application_spawner.rb:321:instart_request_handler'
/Library/Ruby/Gems/1.8/gems/passenger-3.0.7/lib/phusion_passenger/classic_rails/application_spawner.rb:275:in
发送' /Library/Ruby/Gems/1.8/gems/passenger-3.0.7/lib/phusion_passenger/classic_rails/application_spawner.rb:275:in handle_spawn_application'
/Library/Ruby/Gems/1.8/gems/passenger-3.0.7/lib/phusion_passenger/utils.rb:479:in
safe_fork' /Library/Ruby/Gems/1.8/gems/passenger-3.0.7 /lib/phusion_passenger/classic_rails/application_spawner.rb:270:in handle_spawn_application'
/Library/Ruby/Gems/1.8/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server.rb:357:in
send '/Library/Ruby/Gems/1.8/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server.rb:357:in server_main_loop'
/Library/Ruby/Gems/1.8/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server.rb:206:in
start_synchronously' /Library/Ruby /Gems/1.8/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server.rb:180:in start'
/Library/Ruby/Gems/1.8/gems/passenger-3.0.7/lib/phusion_passenger/classic_rails/application_spawner.rb:149:in
start' /Library/Ruby/Gems/1.8/gems/passenger-3.0.7/lib/phusion_passenger/spawn_manager.rb :219:in spawn_rails_application'
/Library/Ruby/Gems/1.8/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server_collection.rb:132:in
lookup_or_add' /Library/Ruby/Gems/1.8/gems/passenger-3.0.7/lib/phusion_passenger/spawn_manager.rb:214:inspawn_rails_application'
/Library/Ruby/Gems/1.8/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server_collection.rb:82:in
同步'/Library/Ruby/Gems/1.8/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server_collection.rb:79:in synchronize'
/Library/Ruby/Gems/1.8/gems/passenger-3.0.7/lib/phusion_passenger/spawn_manager.rb:213:in
spawn_rails_application' /Library/Ruby/Gems/1.8/gems/passenger-3.0.7/lib /phusion_passenger/spawn_manager.rb:132:in spawn_application'
/Library/Ruby/Gems/1.8/gems/passenger-3.0.7/lib/phusion_passenger/spawn_manager.rb:275:in
handle_spawn_application' /Library/Ruby/Gems/1.8/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server.rb:357:in __send__'
/Library/Ruby/Gems/1.8/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server.rb:357:in
server_main_loop' /Library/Ruby/Gems/1.8 /gems/passenger-3.0.7/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously' /Library/Ruby/Gems/1.8/gems/passenger-3.0.7/helper-scripts/passenger-spawn-server: 99