Error with configuring thinking sphinx and flying sphinx
Asked Answered
T

2

11

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.

Talkathon answered 31/8, 2012 at 7:29 Comment(2)
It appears that flying_sphinx is now at 0.8.5 (or there is 0.7.1). Maybe you can try updating the gem?Pinnule
I have exactly the same problem. Anyone come up with an answer to this?Angel
W
1

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

Woodchopper answered 5/4, 2013 at 1:16 Comment(0)
C
1

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'
Contemporaneous answered 16/9, 2013 at 23:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.