tag:support.flying-sphinx.com,2011-01-05:/discussions/problems/335-using-flying-sphinx-with-rails-23-cleared-cloud-mysql-add-onFlying Sphinx: Discussion 2018-10-19T03:09:28Ztag:support.flying-sphinx.com,2011-01-05:Comment/183367012012-08-28T14:58:18Z2012-08-28T14:58:24ZUsing Flying Sphinx with rails 2.3 & cleared (cloud mysql add-on)<div><p>thats "cleardb" - autocorrect fail.</p></div>jerrodtag:support.flying-sphinx.com,2011-01-05:Comment/183367012012-08-28T14:59:04Z2012-08-28T14:59:22ZUsing Flying Sphinx with rails 2.3 & cleared (cloud mysql add-on)<div><p>note the same error when running the FS index task</p>
<pre>
<code>➜ ~/Sites/signmeto-roadrunner git:(master) ✗ (ruby-1.9.2-p320@signmeto) heroku run rake fs:index --trace
Running rake fs:index --trace attached to terminal... up, run.1
** Invoke fs:index (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
production database is not configured
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/connection_specification.rb:62:in `establish_connection'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/connection_specification.rb:55:in `establish_connection'
/app/vendor/bundle/ruby/1.9.1/gems/rails-2.3.14/lib/initializer.rb:438:in `initialize_database'
/app/vendor/bundle/ruby/1.9.1/gems/rails-2.3.14/lib/initializer.rb:141:in `process'
/app/vendor/bundle/ruby/1.9.1/gems/rails-2.3.14/lib/initializer.rb:113:in `run'
/app/config/environment.rb:9:in `<top (required)>'</code>
</pre></div>jerrodtag:support.flying-sphinx.com,2011-01-05:Comment/183367012012-08-28T15:02:21Z2012-08-28T15:02:21ZUsing Flying Sphinx with rails 2.3 & cleared (cloud mysql add-on)<div><p>Hi Jerrod</p>
<p>You'll definitely need to stick with the fs tasks. Is your
DATABASE_URL environment variable set to your cleardb database
connection?</p>
<p>Pat</p></div>Pat Allantag:support.flying-sphinx.com,2011-01-05:Comment/183367012012-08-28T15:27:20Z2012-08-28T15:27:21ZUsing Flying Sphinx with rails 2.3 & cleared (cloud mysql add-on)<div><p>yep sure is:</p>
<pre>
<code>DATABASE_URL => mysql2://xxxxxxxxxx:xxxxxxxxxxxx@us-cdbr-east.cleardb.com/heroku_xxxxxxxxxxxxx?reconnect=true</code>
</pre></div>jerrodtag:support.flying-sphinx.com,2011-01-05:Comment/183367012012-08-28T16:41:41Z2012-08-28T16:41:45ZUsing Flying Sphinx with rails 2.3 & cleared (cloud mysql add-on)<div><p>trying the CLI commands from the docs:</p>
<pre>
<code>➜ ~/Sites/signmeto-roadrunner git:(master) (ruby-1.9.2-p320@signmeto) heroku run flying-sphinx index
Running flying-sphinx index attached to terminal... up, run.3
Index Request has completed:
Sphinx 1.10-beta (r2420)
Copyright (c) 2001-2010, Andrew Aksyonoff
Copyright (c) 2008-2010, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/mnt/local/flying-sphinx/89aca395d2e09a53b/sphinx.conf'...
FATAL: no indexes found in config file '/mnt/local/flying-sphinx/89aca395d2e09a53b/sphinx.conf'</code>
</pre>
<p>and from the app log:</p>
<pre>
<code>Connection to ec2-184-72-209-147.compute-1.amazonaws.com on 9336 failed. Connection refused - connect(2)</code>
</pre>
<p>What other info would be helpful in troubleshooting this?</p></div>jerrodtag:support.flying-sphinx.com,2011-01-05:Comment/183367012012-08-28T16:43:12Z2012-08-28T16:43:13ZUsing Flying Sphinx with rails 2.3 & cleared (cloud mysql add-on)<div><pre>
<code>➜ ~/Sites/signmeto-roadrunner git:(master) (ruby-1.9.2-p320@signmeto) heroku run console
Running console attached to terminal... up, run.3
Loading production environment (Rails 2.3.14)
>> ThinkingSphinx.search
Riddle::ConnectionError: Connection to ec2-184-72-209-147.compute-1.amazonaws.com on 9336 failed. Connection refused - connect(2)</code>
</pre></div>jerrodtag:support.flying-sphinx.com,2011-01-05:Comment/183367012012-08-28T17:01:28Z2012-08-28T17:01:33ZUsing Flying Sphinx with rails 2.3 & cleared (cloud mysql add-on)<div><p>i turned on verbose logging and now i see this:</p>
<pre>
<code>
➜ ~/Sites/signmeto-roadrunner git:(master) ✗ (ruby-1.9.2-p320@signmeto) heroku run flying-sphinx restart
Running flying-sphinx restart attached to terminal... up, run.4
/app/vendor/bundle/ruby/1.9.1/gems/flying-sphinx-0.8.1/lib/flying_sphinx/api.rb:75:in `log_message': undefined method `zone' for Time:Class (NoMethodError)</code>
</pre></div>jerrodtag:support.flying-sphinx.com,2011-01-05:Comment/183367012012-08-28T17:02:37Z2012-08-28T17:02:51ZUsing Flying Sphinx with rails 2.3 & cleared (cloud mysql add-on)<div><p>oh - app name is "signmeto-roadrunner"</p></div>jerrodtag:support.flying-sphinx.com,2011-01-05:Comment/183367012012-08-28T17:20:04Z2012-08-28T17:20:04ZUsing Flying Sphinx with rails 2.3 & cleared (cloud mysql add-on)<div><p>I've just released flying-sphinx 0.8.2 which should handle the
zone method not existing. I'm not convinced that's the cause of the
original error though… I'm at a bit of a loss for that.
Still, give this a shot, see how you go. Let me know what the
verbose output of the fs:rebuild task is.</p>
<p>Thanks</p>
<p>Pat</p></div>Pat Allantag:support.flying-sphinx.com,2011-01-05:Comment/183367012012-08-28T18:24:29Z2012-08-28T18:24:41ZUsing Flying Sphinx with rails 2.3 & cleared (cloud mysql add-on)<div><p>tracked it down to what appears to be a poorly written rake
task.</p>
<p>testing all my indices now.</p>
<p>Much appreciated, Pat!</p></div>jerrodtag:support.flying-sphinx.com,2011-01-05:Comment/183367012012-08-28T18:27:55Z2012-08-28T18:27:55ZUsing Flying Sphinx with rails 2.3 & cleared (cloud mysql add-on)<div><p>Ah, great to hear. If you hit any further issues, just let me
know.</p></div>Pat Allantag:support.flying-sphinx.com,2011-01-05:Comment/183367012012-08-28T22:40:13Z2012-08-28T22:40:13ZUsing Flying Sphinx with rails 2.3 & cleared (cloud mysql add-on)<div><p>The app works fine otherwise, though? There's nothing in the
stack trace that's suggesting it's a bug from Flying Sphinx's
perspective, but it's odd that the database isn't set up in this
situation…</p>
<p>Pat</p></div>Pat Allantag:support.flying-sphinx.com,2011-01-05:Comment/183367012012-08-28T22:43:03Z2012-08-28T22:43:03ZUsing Flying Sphinx with rails 2.3 & cleared (cloud mysql add-on)<div><p>yeah - nothing that i consider to be flying sphinx or thinking
sphinx's issue. I think i just got "lucky" in that i didn't have
any other rake tasks that needed to run on heroku.</p>
<p>Really appreciate your help, regardless!</p></div>jerrod