Bugs: Browse | Submit New | Admin

[#22370] db:structure:dump gives error

Date:
2008-10-10 12:39
Priority:
2
Submitted By:
Nobody
Assigned To:
Praveen Devarao (praveend)
Category:
Adapter
State:
Open
Summary:
db:structure:dump gives error

Detailed description
running:
rake db:structure:dump --trace

gives the following error:
** Invoke db:structure:dump (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:structure:dump
rake aborted!
You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/tasks/databases.rake:257
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:621:in `call'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:621:in `execute'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:616:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:616:in `execute'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:582:in `invoke_with_call_chain'
c:/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:575:in `invoke_with_call_chain'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:568:in `invoke'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:2031:in `invoke_task'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:2009:in `top_level'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:2009:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:2009:in `top_level'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:2048:in `standard_exception_handling'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:2003:in `top_level'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:1982:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:2048:in `standard_exception_handling'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:1979:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.2/bin/rake:31
c:/ruby/bin/rake:16:in `load'
c:/ruby/bin/rake:16

as the ibm_db adapter isn't recognized as the ActiveRecord::Base.configurations[RAILS_ENV]["adapter"] for
this task.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2008-10-13 09:14
Sender: Praveen Devarao

Hi,

Thanks for writing in. Yes, this task is not supported for ibm_db.
Task rake db:structure:dump is part of the rails code and hence
it requires that this task, rake db:structure:dump, for ibm_db
be supported from within Rails.  For this the Rails code is to
be patched along with  supporting other rake functionalities
of this kind (namely rake db:test:purge, rake db:test:clone etc)
for ibm_db. Given that this would require changes in the Rails
code we would need to see how should we be proceeding with it.
Will keep you updated on how we would go about with this.

Antonio has posted some related helpful hints for the tasks
db:test:clone and db:test:purge here
http://db2onrails.com/2007/06/20/rake-db-test-purge-and-rake-db-t
est-clone/

Let us know if you require some more info.

Thanks 

Praveen

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
priority32008-10-13 09:14praveend
assigned_toalexp2008-10-13 06:38praveend