Ah, so it's from an STI setup... right, now I have something more  
concrete to test with, will try and make the code smarter.

Cheers

-- 
Pat

On 06/10/2008, at 6:25 AM, Wolf wrote:

>
> Ok, it's not another plugin which uses the DB on initializing but TS
> itself.
>
> TS uses the method "descends_from_active_record?" on the model which
> asks the DB for the hash of columns which fails, if there isn't a
> table yet.
> By removing your index definition on the inherited class, that method
> isn't called and the rake task can continue.
>
> A workaround for your case, until this issue is fixed, would be to
> remove the inhertitance then call rake db:create and put the
> inheritance back in again afterwards.
>
> regards,
> Wolf
>
>
>
>
> On 5 Okt., 20:42, Vin <[EMAIL PROTECTED]> wrote:
>> Hi Wolf,
>>
>> If I run the  command
>>
>>> rake environment RAILS_ENV=production db:create -v -t
>>
>> I get the following errors.
>>
>> Also could you please elaborate plugins which somehow access the DB
>> when they are added to the class thorugh e.g. acts_as_xyz, so I can
>> properly check the plugins.
>>
>> I don't see above mentioned dependency in the plugins. The other  
>> think
>> I'm confused is how come this plugin dependency was not any issue  
>> with
>> previous version of TS v0.95?
>>
>> Error:--------------------------------
>> Unknown database 'db_production'
>> /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/
>> connection_adapters/mysql_adapter.rb:527:in
>> /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/
>> base.rb:1149:in `columns'
>> /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/
>> base.rb:1157:in `columns_hash'
>> /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/
>> base.rb:1207:in `descends_from_active_record?'
>> /home/vinb/dev/rails/production/mypromos/vendor/plugins/thinking-
>> sphinx/lib/thinking_sphinx/index.rb:270:in `initialize_from_builder'
>> /home/vinb/dev/rails/production/mypromos/vendor/plugins/thinking-
>> sphinx/lib/thinking_sphinx/index.rb:39:in `initialize'
>> /home/vinb/dev/rails/production/mypromos/vendor/plugins/thinking-
>> sphinx/lib/thinking_sphinx/active_record.rb:68:in `new'
>> /home/vinb/dev/rails/production/mypromos/vendor/plugins/thinking-
>> sphinx/lib/thinking_sphinx/active_record.rb:68:in `define_index'
>> /home/vinb/dev/rails/production/mypromos/app/models/all_person.rb:32
>> /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
>> `gem_original_require'
>> /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
>> `require'
>> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/
>> dependencies.rb:510:in `require'
>> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/
>> dependencies.rb:355:in `new_constants_in'
>> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/
>> dependencies.rb:510:in `require'
>> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/
>> dependencies.rb:102:in `require_or_load'
>> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/
>> dependencies.rb:261:in `load_missing_constant'
>> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/
>> dependencies.rb:468:in `const_missing'
>> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/
>> dependencies.rb:480:in `const_missing'
>> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/
>> inflector.rb:285:in `constantize'
>> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/
>> inflector.rb:284:in `each'
>> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/
>> inflector.rb:284:in `constantize'
>> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/
>> core_ext/string/inflections.rb:143:in `constantize'
>> /home/vinb/dev/rails/production/mypromos/vendor/plugins/thinking-
>> sphinx/lib/thinking_sphinx/configuration.rb:174:in `load_models'
>> /home/vinb/dev/rails/production/mypromos/vendor/plugins/thinking-
>> sphinx/lib/thinking_sphinx/configuration.rb:165:in `each'
>> /home/vinb/dev/rails/production/mypromos/vendor/plugins/thinking-
>> sphinx/lib/thinking_sphinx/configuration.rb:165:in `load_models'
>> /home/vinb/dev/rails/production/mypromos/vendor/plugins/thinking-
>> sphinx/init.rb:5:in `evaluate_init_rb'
>> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/
>> callbacks.rb:177:in `call'
>> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/
>> callbacks.rb:177:in `evaluate_method'
>> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/
>> callbacks.rb:161:in `call'
>> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/
>> callbacks.rb:90:in `run'
>> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/
>> callbacks.rb:90:in `each'
>> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/
>> callbacks.rb:90:in `send'
>> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/
>> callbacks.rb:90:in `run'
>> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/
>> callbacks.rb:272:in `run_callbacks'
>> /usr/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/initializer.rb:493:in
>> `send'
>> /usr/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/initializer.rb:493:in
>> `prepare_dispatcher'
>> /usr/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/initializer.rb:155:in
>> `process'
>> /usr/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/initializer.rb:97:in
>> `send'
>> /usr/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/initializer.rb:97:in  
>> `run'
>> /home/vinb/dev/rails/production/mypromos/config/environment.rb:13
>> /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
>> `gem_original_require'
>> /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
>> `require'
>> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/
>> dependencies.rb:510:in `require'
>> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/
>> dependencies.rb:355:in `new_constants_in'
>> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/
>> dependencies.rb:510:in `require'
>> /usr/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/tasks/misc.rake:3
>> /usr/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:621:in `call'
>> /usr/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:621:in `execute'
>> /usr/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:616:in `each'
>> /usr/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:616:in `execute'
>> /usr/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:582:in
>> `invoke_with_call_chain'
>> /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
>> /usr/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:575:in
>> `invoke_with_call_chain'
>> /usr/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:568:in `invoke'
>> /usr/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:2031:in
>> `invoke_task'
>> /usr/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:2009:in  
>> `top_level'
>> /usr/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:2009:in `each'
>> /usr/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:2009:in  
>> `top_level'
>> /usr/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:2048:in
>> `standard_exception_handling'
>> /usr/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:2003:in  
>> `top_level'
>> /usr/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:1982:in `run'
>> /usr/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:2048:in
>> `standard_exception_handling'
>> /usr/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:1979:in `run'
>> /usr/lib/ruby/gems/1.8/gems/rake-0.8.2/bin/rake:31
>> /usr/bin/rake:19:in `load
>>
>> Let me know if I'm looking in the wrong direction, as I'm sort of a
>> noobie in this area.
>>
>> regrad
>> -Vin
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to