Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error with configuring thinking sphinx and flying sphinx

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.

like image 645
Prajkta P Avatar asked Aug 31 '12 07:08

Prajkta P


2 Answers

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).

like image 101
pat Avatar answered Sep 29 '22 12:09

pat


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'
like image 32
syaifulsabril Avatar answered Sep 29 '22 13:09

syaifulsabril