2013-04-02 39 views
0

我正在將我的網站推向heroku,並遇到飛獅體驗的問題。flying sphinx noMethodError =>未定義方法'生成'

我在開發中實現了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 

(我的DB是在PostgreSQL上運行 - 在MySQL2僅適用於獅身人面像)

回答

2

我已經在其他地方與Laurent一起解決了這個問題,但其核心是:gem releas飛行獅身人面像(高達0.8.5)不支持Thinking Sphinx v3。我確實已經準備好了,只是在等待其他依賴關係合併一些提交併發佈自己的gem更新。

在此期間,您可以使用最新和最偉大的(並且這將跨越V1/V2/V3思考獅身人面像最新版本的工作)通過的git:

gem 'pusher-client', 
    :git => 'git://github.com/pat/pusher-ruby-client.git', 
    :branch => 'catch-io', 
    :ref => '608cc28d1a' 
gem 'flying-sphinx', 
    :git => 'git://github.com/flying-sphinx/flying-sphinx.git', 
    :branch => 'master', 
    :ref => 'e1395e724a' 

如果你使用Ruby 1.8.7,您還需要以下寶石覆蓋標準庫中的OpenSSL的一些限制:

gem 'openssl-nonblock', '0.2.1' 
+0

和榮譽帕特的夢幻般的客戶服務 - 感謝您的幫助,在良好的歡呼和真棒產品。 – Laurent

相關問題