如何诊断 thinking sphinx 在 Heroku 上失败(但在本地成功)?
How to diagnose thinking sphinx failing on Heroku (but succeeding locally)?
在相对较旧的 Rails 应用程序和 Heroku Stack (16) 上尝试 运行 rake ts:rebuild
:
rake aborted!
NoMethodError: undefined method `running?' for #<FlyingSphinx::Controller:0x00000005d7ae10>
/app/vendor/bundle/ruby/2.3.0/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/rake_interface.rb:70:in `stop'
/app/vendor/bundle/ruby/2.3.0/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/tasks.rb:47:in `block (2 levels) in <top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/lib/bundler/cli/exec.rb:74:in `load'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/lib/bundler/cli/exec.rb:74:in `kernel_load'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/lib/bundler/cli/exec.rb:28:in `run'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/lib/bundler/cli.rb:463:in `exec'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/lib/bundler/cli.rb:27:in `dispatch'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/lib/bundler/cli.rb:18:in `start'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/exe/bundle:30:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/exe/bundle:22:in `<top (required)>'
/app/bin/bundle:3:in `load'
/app/bin/bundle:3:in `<main>'
Tasks: TOP => ts:rebuild => ts:stop
(See full trace by running task with --trace)
在本地 rake ts:rebuild
成功,因此欢迎任何关于采取诊断步骤的提示!
我想不出调试它的好方法,但我升级了 thinking_sphinx
(3.1.4 -> 4.4.1)和 flying_sphinx
(1.2.1 -> 2.2。 0) 并且错误消失了!
在相对较旧的 Rails 应用程序和 Heroku Stack (16) 上尝试 运行 rake ts:rebuild
:
rake aborted!
NoMethodError: undefined method `running?' for #<FlyingSphinx::Controller:0x00000005d7ae10>
/app/vendor/bundle/ruby/2.3.0/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/rake_interface.rb:70:in `stop'
/app/vendor/bundle/ruby/2.3.0/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/tasks.rb:47:in `block (2 levels) in <top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/lib/bundler/cli/exec.rb:74:in `load'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/lib/bundler/cli/exec.rb:74:in `kernel_load'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/lib/bundler/cli/exec.rb:28:in `run'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/lib/bundler/cli.rb:463:in `exec'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/lib/bundler/cli.rb:27:in `dispatch'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/lib/bundler/cli.rb:18:in `start'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/exe/bundle:30:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.17.3/exe/bundle:22:in `<top (required)>'
/app/bin/bundle:3:in `load'
/app/bin/bundle:3:in `<main>'
Tasks: TOP => ts:rebuild => ts:stop
(See full trace by running task with --trace)
在本地 rake ts:rebuild
成功,因此欢迎任何关于采取诊断步骤的提示!
我想不出调试它的好方法,但我升级了 thinking_sphinx
(3.1.4 -> 4.4.1)和 flying_sphinx
(1.2.1 -> 2.2。 0) 并且错误消失了!