我正在将我的网站推送到 heroku 并且遇到了飞行狮身人面像的问题。
我在开发中实现了一个有效的 Thinking-Sphinx 搜索功能。它工作得很好。我获得了飞行狮身人面像。但是,当我运行时:
heroku run flying-sphinx configure
我收到以下错误消息:
Connecting to database specified by DATABASE_URL
/app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-0.8.5/lib/flying_sphinx/sphinx_configuration.rb:24:in `content': undefined method `generate' for #<ThinkingSphinx::Configuration:0x00000004648e90> (NoMethodError)
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-0.8.5/lib/flying_sphinx/sphinx_configuration.rb:8:in `upload_to'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-0.8.5/lib/flying_sphinx/cli.rb:32:in `configure'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-0.8.5/lib/flying_sphinx/cli.rb:20:in `block in run'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-0.8.5/lib/flying_sphinx/cli.rb:20:in `each'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-0.8.5/lib/flying_sphinx/cli.rb:20:in `all?'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-0.8.5/lib/flying_sphinx/cli.rb:20:in `run'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-0.8.5/bin/flying-sphinx:5:in `<top (required)>'
from /app/bin/flying-sphinx:19:in `load'
from /app/bin/flying-sphinx:19:in `<main>
以下是我使用的版本:
Rails 3.2.11
Thinking-Sphinx 3.0.2
Flying-Sphinx 0.8.5
MySQL2 0.3.12
(我的数据库在 PostGresql 上运行 - MySQL2 仅用于 Sphinx)