I have Rails 3 application running on Heroku. I am using Thinking Sphinx
search engine into my application. For making it work with Heroku, I have added a flying-sphinx
gem to my gemfile as suggested in the Heroku docs.
This is what I have in my gemfile
gem 'thinking-sphinx', '2.0.11'
gem 'flying-sphinx', '0.7.0'
As per the steps mentioned here https://devcenter.heroku.com/articles/flying_sphinx, After adding the flying-sphinx addon (Heroku addons:add flying_sphinx:wooden), when I run heroku run flying-sphinx configure I get following error:
/app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-0.8.0/lib/flying_sphinx/sphinx_configuration.rb:2:in 'initialize': uninitialized constant FlyingSphinx::SphinxConfiguration::ThinkingSphinx (NameError)
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-0.8.0/lib/flying_sphinx/cli.rb:31:in 'new'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-0.8.0/lib/flying_sphinx/cli.rb:31:in 'configure'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-0.8.0/lib/flying_sphinx/cli.rb:20:in 'block in run'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-0.8.0/lib/flying_sphinx/cli.rb:20:in 'each'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-0.8.0/lib/flying_sphinx/cli.rb:20:in 'all?'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-0.8.0/lib/flying_sphinx/cli.rb:20:in 'run'
from /app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-0.8.0/bin/flying-sphinx:5:in ''
from vendor/bundle/ruby/1.9.1/bin/flying-sphinx:19:in 'load'
from vendor/bundle/ruby/1.9.1/bin/flying-sphinx:19:in ''
And I am not able to proceed further.
Just to answer the original question - going by the stacktrace, if looks like you're using flying-sphinx 0.8.0 - which was definitely buggy, hence more recent releases. Hopefully you followed Bert's suggestion and gave 0.8.5 a spin (0.7.1 is the latest for Rails 2.3).
My working Gemfile setup for rails 3:
gem 'thinking-sphinx', "~> 2.0.10", require: 'thinking_sphinx'
gem 'flying-sphinx', '0.8.4'
or
# sphinx
gem 'thinking-sphinx', '3.0.3'
gem 'flying-sphinx', '1.0.0'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With