Connection refused

83 weergaven
Naar het eerste ongelezen bericht

tashfeen.ekram

ongelezen,
29 jan 2011, 21:02:4429-01-2011
aan Thinking Sphinx
I had originalyl posted my issue here:

http://groups.google.com/group/thinking-sphinx/browse_thread/thread/bf78f59e29d8d168/a09c3841fddd84d5?lnk=gst&q=conneciton+refused#a09c3841fddd84d5

But, I upgraded everything and it seemed like that solved the problem.
Now, when I run in developmemnt mode everything runs fine. However,
when I try to do it in produciton mode, i run into the same error.

rake RAILS_ENV=production thinking_sphinx:configure --trace
(in /var/www/xxx)
** Invoke thinking_sphinx:configure (first_time)
** Invoke thinking_sphinx:app_env (first_time)
** Execute thinking_sphinx:app_env
Sat Jan 29 20:57:54 -0500 2011
rake aborted!
Connection to 127.0.0.1 on 9312 failed. Connection refused -
connect(2)

i am running rails 3.0.3, riddle 1.2.2, and thinking-sphinx 2.0.2.

thanks.

Pat Allan

ongelezen,
29 jan 2011, 21:11:3129-01-2011
aan thinkin...@googlegroups.com
It looks like you're doing something that's searching while the Rails app is being loaded - in an initializer, perhaps?

Is there a stack trace when you run that rake task, and can you share it with us?

--
Pat

> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To post to this group, send email to thinkin...@googlegroups.com.
> To unsubscribe from this group, send email to thinking-sphi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
>

tashfeen.ekram

ongelezen,
29 jan 2011, 21:22:5029-01-2011
aan Thinking Sphinx
Wow, that was a fast response!

Your are right. It is running my files located in app/runners/cron/.
for some strange reason.

I am not sure why it is doing that because it does not do that when I
run the takes in dev (ie rake ts:configure). I looked through all my
intializer files and can not find anywhere that might indicate why it
is diong this. trace is below. it did not really seem to help me. :(


rake RAILS_ENV=production thinking_sphinx:configure --trace
(in /var/www/drugbin)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
asset_packager/tasks/asset_packager_tasks.rake are deprecated. Use lib/
tasks instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: RAILS_ROOT is deprecated. Please
use ::Rails.root.to_s. (called from /var/www/drugbin/vendor/plugins/
asset_packager/tasks/../lib/synthesis/asset_package.rb:6)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
jrails/tasks/jrails.rake are deprecated. Use lib/tasks instead.
(called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
prawnto/tasks/prawnto_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
recaptcha/tasks/recaptcha_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
yaml_db/tasks/yaml_db_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
** Invoke thinking_sphinx:configure (first_time)
** Invoke thinking_sphinx:app_env (first_time)
** Execute thinking_sphinx:app_env
drug to prices
rake aborted!
Connection to 127.0.0.1 on 9312 failed. Connection refused -
connect(2)
/var/www/drugbin/ruby/1.8/gems/riddle-1.2.2/lib/riddle/client.rb:
563:in `initialise_socket'
/var/www/drugbin/ruby/1.8/gems/riddle-1.2.2/lib/riddle/0.9.9/client.rb:
8:in `initialise_connection'
/var/www/drugbin/ruby/1.8/gems/riddle-1.2.2/lib/riddle/client.rb:
486:in `open_socket'
/var/www/drugbin/ruby/1.8/gems/riddle-1.2.2/lib/riddle/client.rb:
522:in `connect'
/var/www/drugbin/ruby/1.8/gems/riddle-1.2.2/lib/riddle/client.rb:
582:in `request'
/var/www/drugbin/ruby/1.8/gems/riddle-1.2.2/lib/riddle/client.rb:
221:in `run'
/var/www/drugbin/ruby/1.8/gems/riddle-1.2.2/lib/riddle/client.rb:
328:in `query'
/var/www/drugbin/ruby/1.8/gems/thinking-sphinx-2.0.2/lib/
thinking_sphinx/search.rb:391
/var/www/drugbin/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/
notifications.rb:52:in `instrument'
/var/www/drugbin/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/
notifications/instrumenter.rb:21:in `instrument'
/var/www/drugbin/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/
notifications.rb:52:in `instrument'
/var/www/drugbin/ruby/1.8/gems/thinking-sphinx-2.0.2/lib/
thinking_sphinx/search.rb:464:in `log'
/var/www/drugbin/ruby/1.8/gems/thinking-sphinx-2.0.2/lib/
thinking_sphinx/search.rb:472:in `log'
/var/www/drugbin/ruby/1.8/gems/thinking-sphinx-2.0.2/lib/
thinking_sphinx/search.rb:390
/var/www/drugbin/ruby/1.8/gems/thinking-sphinx-2.0.2/lib/
thinking_sphinx/search.rb:513:in `call'
/var/www/drugbin/ruby/1.8/gems/thinking-sphinx-2.0.2/lib/
thinking_sphinx/search.rb:513:in `retry_on_stale_index'
/var/www/drugbin/ruby/1.8/gems/thinking-sphinx-2.0.2/lib/
thinking_sphinx/search.rb:388:in `populate'
/var/www/drugbin/ruby/1.8/gems/thinking-sphinx-2.0.2/lib/
thinking_sphinx/search.rb:176:in `method_missing'
/var/www/drugbin/app/runners/cron/drug_to_drugprice.rb:10
/var/www/drugbin/app/runners/cron/drug_to_drugprice.rb:7:in `each'
/var/www/drugbin/app/runners/cron/drug_to_drugprice.rb:7
/var/www/drugbin/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/
dependencies.rb:239:in `require'
/var/www/drugbin/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/
dependencies.rb:239:in `require'
/var/www/drugbin/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/
dependencies.rb:227:in `load_dependency'
/var/www/drugbin/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/
dependencies.rb:239:in `require'
/var/www/drugbin/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/
dependencies.rb:346:in `require_or_load'
/var/www/drugbin/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/
dependencies.rb:300:in `depend_on'
/var/www/drugbin/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/
dependencies.rb:216:in `require_dependency'
/var/www/drugbin/ruby/1.8/gems/railties-3.0.3/lib/rails/engine.rb:
138:in `eager_load!'
/var/www/drugbin/ruby/1.8/gems/railties-3.0.3/lib/rails/engine.rb:
137:in `each'
/var/www/drugbin/ruby/1.8/gems/railties-3.0.3/lib/rails/engine.rb:
137:in `eager_load!'
/var/www/drugbin/ruby/1.8/gems/railties-3.0.3/lib/rails/engine.rb:
135:in `each'
/var/www/drugbin/ruby/1.8/gems/railties-3.0.3/lib/rails/engine.rb:
135:in `eager_load!'
/var/www/drugbin/ruby/1.8/gems/railties-3.0.3/lib/rails/application.rb:
108:in `eager_load!'
/var/www/drugbin/ruby/1.8/gems/railties-3.0.3/lib/rails/application/
finisher.rb:41
/var/www/drugbin/ruby/1.8/gems/railties-3.0.3/lib/rails/
initializable.rb:25:in `instance_exec'
/var/www/drugbin/ruby/1.8/gems/railties-3.0.3/lib/rails/
initializable.rb:25:in `run'
/var/www/drugbin/ruby/1.8/gems/railties-3.0.3/lib/rails/
initializable.rb:50:in `run_initializers'
/var/www/drugbin/ruby/1.8/gems/railties-3.0.3/lib/rails/
initializable.rb:49:in `each'
/var/www/drugbin/ruby/1.8/gems/railties-3.0.3/lib/rails/
initializable.rb:49:in `run_initializers'
/var/www/drugbin/ruby/1.8/gems/railties-3.0.3/lib/rails/application.rb:
134:in `initialize!'
/var/www/drugbin/ruby/1.8/gems/railties-3.0.3/lib/rails/application.rb:
77:in `send'
/var/www/drugbin/ruby/1.8/gems/railties-3.0.3/lib/rails/application.rb:
77:in `method_missing'
/var/www/drugbin/config/environment.rb:5
/var/www/drugbin/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/
dependencies.rb:239:in `require'
/var/www/drugbin/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/
dependencies.rb:239:in `require'
/var/www/drugbin/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/
dependencies.rb:225:in `load_dependency'
/var/www/drugbin/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/
dependencies.rb:596:in `new_constants_in'
/var/www/drugbin/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/
dependencies.rb:225:in `load_dependency'
/var/www/drugbin/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/
dependencies.rb:239:in `require'
/var/www/drugbin/ruby/1.8/gems/railties-3.0.3/lib/rails/application.rb:
103:in `require_environment!'
/var/www/drugbin/ruby/1.8/gems/thinking-sphinx-2.0.2/lib/
thinking_sphinx/tasks.rb:7
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
`execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
`execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
`invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
`invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in
`invoke_prerequisites'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in
`invoke_prerequisites'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in
`invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
`invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in
`invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
`invoke_task'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in
`top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19


On Jan 29, 9:11 pm, Pat Allan <p...@freelancing-gods.com> wrote:
> It looks like you're doing something that's searching while the Rails app is being loaded - in an initializer, perhaps?
>
> Is there a stack trace when you run that rake task, and can you share it with us?
>
> --
> Pat
>
> On 30/01/2011, at 1:02 PM, tashfeen.ekram wrote:
>
> > I had originalyl posted my issue here:
>
> >http://groups.google.com/group/thinking-sphinx/browse_thread/thread/b...

Pat Allan

ongelezen,
29 jan 2011, 21:25:4529-01-2011
aan thinkin...@googlegroups.com
What happens if you run the rake task with the env variable at the very start or very end?

RAILS_ENV=production rake thinking_sphinx:configure --trace
rake thinking_sphinx:configure --trace RAILS_ENV=production

Those are normally how I would write such commands - not sure if it makes a difference, though.

--
Pat

tashfeen.ekram

ongelezen,
29 jan 2011, 21:30:4329-01-2011
aan Thinking Sphinx
Same exact result. :(

This is an app that was upgraded from 2.x to 3.0.3. Could that be
causing some strange way for them to be loaded on rake calls?
> ...
>
> read more »

Pat Allan

ongelezen,
29 jan 2011, 21:36:0429-01-2011
aan thinkin...@googlegroups.com
Does it happen with other rake calls that aren't related to Thinking Sphinx? I wonder if Rails is automatically loading what's in app/runners/cron - what does your config/application.rb file look like?

--
Pat

tashfeen.ekram

ongelezen,
29 jan 2011, 21:44:0229-01-2011
aan Thinking Sphinx
here is application.rb:

http://pastie.org/1510550

so i did another rake command in production and i did not seem to run
into that prob.

rake db:migrate --trace RAILS_ENV=production
(in /var/www/drugbin)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
asset_packager/tasks/asset_packager_tasks.rake are deprecated. Use lib/
tasks instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: RAILS_ROOT is deprecated. Please
use ::Rails.root.to_s. (called from /var/www/drugbin/vendor/plugins/
asset_packager/tasks/../lib/synthesis/asset_package.rb:6)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
jrails/tasks/jrails.rake are deprecated. Use lib/tasks instead.
(called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
prawnto/tasks/prawnto_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
recaptcha/tasks/recaptcha_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
yaml_db/tasks/yaml_db_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
> ...
>
> read more »

Pat Allan

ongelezen,
30 jan 2011, 08:18:5430-01-2011
aan thinkin...@googlegroups.com
I wonder if it's something to do with how TS loads the Rails environment. What about the following rake task:

rake thinking_sphinx:app_env

--
Pat

tashfeen.ekram

ongelezen,
30 jan 2011, 09:01:4430-01-2011
aan Thinking Sphinx
Here is what i get:

rake thinking_sphinx:app_env

(in /var/www/drugbin)
DEPRECATION WARNING: "Rails.root/test/mocks/development" won't be
added automatically to load paths anymore in future releases. (called
from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
asset_packager/tasks/asset_packager_tasks.rake are deprecated. Use lib/
tasks instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: RAILS_ROOT is deprecated. Please
use ::Rails.root.to_s. (called from /var/www/drugbin/vendor/plugins/
asset_packager/tasks/../lib/synthesis/asset_package.rb:6)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
jrails/tasks/jrails.rake are deprecated. Use lib/tasks instead.
(called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
prawnto/tasks/prawnto_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
recaptcha/tasks/recaptcha_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
yaml_db/tasks/yaml_db_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)

nothing else.... does that help?
> ...
>
> read more »

tashfeen.ekram

ongelezen,
30 jan 2011, 09:04:3230-01-2011
aan Thinking Sphinx
Here is what i get:

rake thinking_sphinx:app_env

(in /var/www/drugbin)
DEPRECATION WARNING: "Rails.root/test/mocks/development" won't be
added automatically to load paths anymore in future releases. (called
from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
asset_packager/tasks/asset_packager_tasks.rake are deprecated. Use lib/
tasks instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: RAILS_ROOT is deprecated. Please
use ::Rails.root.to_s. (called from /var/www/drugbin/vendor/plugins/
asset_packager/tasks/../lib/synthesis/asset_package.rb:6)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
jrails/tasks/jrails.rake are deprecated. Use lib/tasks instead.
(called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
prawnto/tasks/prawnto_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
recaptcha/tasks/recaptcha_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
yaml_db/tasks/yaml_db_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)

nothing else.... does that help?


On Jan 30, 8:18 am, Pat Allan <p...@freelancing-gods.com> wrote:
> ...
>
> read more »

Pat Allan

ongelezen,
30 jan 2011, 09:25:3630-01-2011
aan thinkin...@googlegroups.com
What about when it's run with the production environment, with --trace?

--
Pat

tashfeen.ekram

ongelezen,
30 jan 2011, 09:33:2930-01-2011
aan Thinking Sphinx
Here is what i get:

rake thinking_sphinx:app_env

(in /var/www/drugbin)
DEPRECATION WARNING: "Rails.root/test/mocks/development" won't be
added automatically to load paths anymore in future releases. (called
from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
asset_packager/tasks/asset_packager_tasks.rake are deprecated. Use lib/
tasks instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: RAILS_ROOT is deprecated. Please
use ::Rails.root.to_s. (called from /var/www/drugbin/vendor/plugins/
asset_packager/tasks/../lib/synthesis/asset_package.rb:6)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
jrails/tasks/jrails.rake are deprecated. Use lib/tasks instead.
(called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
prawnto/tasks/prawnto_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
recaptcha/tasks/recaptcha_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
yaml_db/tasks/yaml_db_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)

nothing else.... does that help?


On Jan 30, 8:18 am, Pat Allan <p...@freelancing-gods.com> wrote:
> ...
>
> read more »

tashfeen.ekram

ongelezen,
30 jan 2011, 09:42:1330-01-2011
aan Thinking Sphinx
lloks like the same trace...

rake thinking_sphinx:app_env RAILS_ENV=production --trace
(in /var/www/drugbin)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
asset_packager/tasks/asset_packager_tasks.rake are deprecated. Use lib/
tasks instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: RAILS_ROOT is deprecated. Please
use ::Rails.root.to_s. (called from /var/www/drugbin/vendor/plugins/
asset_packager/tasks/../lib/synthesis/asset_package.rb:6)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
jrails/tasks/jrails.rake are deprecated. Use lib/tasks instead.
(called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
prawnto/tasks/prawnto_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
recaptcha/tasks/recaptcha_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
yaml_db/tasks/yaml_db_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
/var/www/drugbin/ruby/1.8/gems/railties-3.0.3/lib/rails/application.rb:
103:in `require_environment!'
/var/www/drugbin/ruby/1.8/gems/thinking-sphinx-2.0.2/lib/
thinking_sphinx/tasks.rb:7
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
`execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
`execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
`invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
`invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in
`invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
`invoke_task'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in
`top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19


On Jan 30, 9:25 am, Pat Allan <p...@freelancing-gods.com> wrote:
> What about when it's run with the production environment, with --trace?
>
> --
> Pat
>
> ...
>
> read more »

tashfeen.ekram

ongelezen,
30 jan 2011, 09:49:1130-01-2011
aan Thinking Sphinx
lloks like the same trace...

rake thinking_sphinx:app_env RAILS_ENV=production --trace
(in /var/www/drugbin)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
asset_packager/tasks/asset_packager_tasks.rake are deprecated. Use lib/
tasks instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: RAILS_ROOT is deprecated. Please
use ::Rails.root.to_s. (called from /var/www/drugbin/vendor/plugins/
asset_packager/tasks/../lib/synthesis/asset_package.rb:6)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
jrails/tasks/jrails.rake are deprecated. Use lib/tasks instead.
(called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
prawnto/tasks/prawnto_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
recaptcha/tasks/recaptcha_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
yaml_db/tasks/yaml_db_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
/var/www/drugbin/ruby/1.8/gems/railties-3.0.3/lib/rails/application.rb:
103:in `require_environment!'
/var/www/drugbin/ruby/1.8/gems/thinking-sphinx-2.0.2/lib/
thinking_sphinx/tasks.rb:7
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
`execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
`execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
`invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
`invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in
`invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
`invoke_task'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in
`top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19


On Jan 30, 9:25 am, Pat Allan <p...@freelancing-gods.com> wrote:
> What about when it's run with the production environment, with --trace?
>
> --
> Pat
>
> ...
>
> read more »

tashfeen.ekram

ongelezen,
30 jan 2011, 09:58:5230-01-2011
aan Thinking Sphinx
lloks like the same trace...

rake thinking_sphinx:app_env RAILS_ENV=production --trace
(in /var/www/drugbin)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
asset_packager/tasks/asset_packager_tasks.rake are deprecated. Use lib/
tasks instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: RAILS_ROOT is deprecated. Please
use ::Rails.root.to_s. (called from /var/www/drugbin/vendor/plugins/
asset_packager/tasks/../lib/synthesis/asset_package.rb:6)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
jrails/tasks/jrails.rake are deprecated. Use lib/tasks instead.
(called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
prawnto/tasks/prawnto_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
recaptcha/tasks/recaptcha_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
yaml_db/tasks/yaml_db_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
/var/www/drugbin/ruby/1.8/gems/railties-3.0.3/lib/rails/application.rb:
103:in `require_environment!'
/var/www/drugbin/ruby/1.8/gems/thinking-sphinx-2.0.2/lib/
thinking_sphinx/tasks.rb:7
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
`execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
`execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
`invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
`invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in
`invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
`invoke_task'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in
`top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19


On Jan 30, 9:25 am, Pat Allan <p...@freelancing-gods.com> wrote:
> What about when it's run with the production environment, with --trace?
>
> --
> Pat
>
> ...
>
> read more »

tashfeen.ekram

ongelezen,
30 jan 2011, 10:06:4830-01-2011
aan Thinking Sphinx
lloks like the same trace...

rake thinking_sphinx:app_env RAILS_ENV=production --trace
(in /var/www/drugbin)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
asset_packager/tasks/asset_packager_tasks.rake are deprecated. Use lib/
tasks instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: RAILS_ROOT is deprecated. Please
use ::Rails.root.to_s. (called from /var/www/drugbin/vendor/plugins/
asset_packager/tasks/../lib/synthesis/asset_package.rb:6)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
jrails/tasks/jrails.rake are deprecated. Use lib/tasks instead.
(called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
prawnto/tasks/prawnto_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
recaptcha/tasks/recaptcha_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
DEPRECATION WARNING: Rake tasks in /var/www/drugbin/vendor/plugins/
yaml_db/tasks/yaml_db_tasks.rake are deprecated. Use lib/tasks
instead. (called from /var/www/drugbin/Rakefile:7)
/var/www/drugbin/ruby/1.8/gems/railties-3.0.3/lib/rails/application.rb:
103:in `require_environment!'
/var/www/drugbin/ruby/1.8/gems/thinking-sphinx-2.0.2/lib/
thinking_sphinx/tasks.rb:7
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
`execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
`execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
`invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
`invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in
`invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
`invoke_task'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in
`top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19


On Jan 30, 9:25 am, Pat Allan <p...@freelancing-gods.com> wrote:
> What about when it's run with the production environment, with --trace?
>
> --
> Pat
>
> ...
>
> read more »

tashfeen.ekram

ongelezen,
30 jan 2011, 10:30:5230-01-2011
aan Thinking Sphinx
ooops. sorry did nto realize my response got submitted way too many
times. i just kept hitting the reload button to see if there was a
response. :(

On Jan 30, 10:06 am, "tashfeen.ekram" <tashfeen.ek...@gmail.com>
wrote:
> ...
>
> read more »

Pat Allan

ongelezen,
30 jan 2011, 19:20:1730-01-2011
aan thinkin...@googlegroups.com
Right. That task does only two things:
* Loads the Rails environment (like pretty much any other Rails rake task)
* Turns off class caching:
Rails.configuration.cache_classes = false

So it seems that second item is what's causing the problem. I've no idea why, mind you... you haven't requested app/runners/cron to be loaded automatically in your application.rb (unless you've put that elsewhere?) so I'm surprised it's being called.

What about your config/environments/production.rb file - have you changed that file at all from the default?

--
Pat

tashfeen.ekram

ongelezen,
30 jan 2011, 20:52:1230-01-2011
aan Thinking Sphinx
here is my config/environments/production.rb : http://pastie.org/1513453

application.rb: http://pastie.org/1513458

they seem ok to me.

this is quite strange indeed. i even tried changing the directory name
to something completely different and it still is loading the files.

just so that i undertand. the last rake you had me try only does two
things. you are thinking loading the rails environment is not the
source of the porblem but the source is when it is setting caching of
classes to true is where i am running into this problem?
> ...
>
> read more »

tashfeen.ekram

ongelezen,
30 jan 2011, 21:16:4930-01-2011
aan Thinking Sphinx
well, did some investigating and when i change in production.rb

config.cache_classes to false then the problem goes away...

looking into rails api's i guess??
> ...
>
> read more »

Pat Allan

ongelezen,
31 jan 2011, 07:18:5431-01-2011
aan thinkin...@googlegroups.com
I guess... not sure if it's a Rails bug or not, or maybe some other library you're using is causing the problem? Hard to tell... ideally, you want to normally cache classes in production.

--
Pat

tashfeen.ekram

ongelezen,
5 feb 2011, 13:00:4405-02-2011
aan Thinking Sphinx
Still trying to figure this out.

It seems like I only run into this error when running TS tasks in
production mode. However, when i try other rake tasks in produciont
like below i do not get this error. Is that expected?

rake db:migrate RAILS_ENV=production

rake rails_upgrade:check RAILS_ENV=production

Should not those commands also cache the classes and lead me to the
same problem?

On Jan 31, 7:18 am, Pat Allan <p...@freelancing-gods.com> wrote:
> I guess... not sure if it's a Rails bug or not, or maybe some other library you're using is causing the problem? Hard to tell... ideally, you want to normally cache classes in production.
>
> --
> Pat
>
> On 31/01/2011, at 1:16 PM,tashfeen.ekram wrote:
>
>
>
>
>
>
>
> > well, did some investigating and when i change in production.rb
>
> >  config.cache_classes to  false then the problem goes away...
>
> > looking into rails api's i guess??
>
> > On Jan 30, 8:52 pm, "tashfeen.ekram" <tashfeen.ek...@gmail.com> wrote:
> >> here is my config/environments/production.rb :http://pastie.org/1513453
>
> >> application.rb:http://pastie.org/1513458
>
> >> they seem ok to me.
>
> >> this is quite strange indeed. i even tried changing the directory name
> >> to something completely different and it still is loading the files.
>
> >> just so that i undertand. the last rake you had me try only does two
> >> things. you are thinking loading the rails environment is not the
> >> source of the porblem but the source is when it is setting caching of
> >> classes to true is where i am running into this problem?
>
> >> On Jan 30, 7:20 pm, Pat Allan <p...@freelancing-gods.com> wrote:
>
> >>> Right. That task does only two things:
> >>> * Loads the Rails environment (like pretty much any other Rails rake task)
> >>> * Turns off class caching:
> >>>   Rails.configuration.cache_classes = false
>
> >>> So it seems that second item is what's causing the problem. I've no idea why, mind you... you haven't requested app/runners/cron to be loaded automatically in your application.rb (unless you've put that elsewhere?) so I'm surprised it's being called.
>
> >>> What about your config/environments/production.rb file - have you changed that file at all from the default?
>
> >>> --
> >>> Pat
>
> ...
>
> read more »

tashfeen.ekram

ongelezen,
5 feb 2011, 14:39:5405-02-2011
aan Thinking Sphinx
finally figured it out. it is a features of rails 3.0.

http://edgeguides.rubyonrails.org/configuring.html

"config.eager_load_paths accepts an array of paths from which Rails
will eager load on boot if cache classes is enabled. Defaults to every
folder in the app directory of the application. All elements of this
array must also be in load_paths."
> ...
>
> read more »

Pat Allan

ongelezen,
6 feb 2011, 09:12:0306-02-2011
aan thinkin...@googlegroups.com
Ah, right.

So are you setting eager_load_paths? What does it default to?

--
Pat

tashfeen.ekram

ongelezen,
6 feb 2011, 13:53:1606-02-2011
aan Thinking Sphinx
So, I am setting it to each individual directory in the app directory
except the runners directory. If you do not set it, then it just loads
everything in the app directory. I think this is something new for
Rails 3 but was not like that for Rails 2.

Thanks for all of your help. I wish all plugins were well supported
like this one. :)
> ...
>
> read more »
Allen beantwoorden
Auteur beantwoorden
Doorsturen
0 nieuwe berichten