Forum: Ruby on Rails Configuration problem on older app upgraded to 1.0

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jeff Hoffman (Guest)
on 2006-01-07 04:22
(Received via mailing list)
Hello, everyone.

I have an application that began on a much earlier version of rails, and
has been upgraded to 1.0. Somewhere along the line, tests got broken.
The first thing I noticed, upon looking into the cause, is that my test
database was not being cloned correctly from development. So, I tried to
run the tasks by hand:

$ rake clone_schema_to_test
(in /Users/jkh/Development/assetstream)
rake aborted!
database configuration does not specify adapter

$ rake clone_structure_to_test
(in /Users/jkh/Development/assetstream)
rake aborted!
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.[]

Strangely, db_schema_export and db_schema_import work just fine. And my
application runs fine. I am using MySQL, and it is configured correctly
in database.yml. To make sure it wasn't a syntax error, I copied
database.yml to a fresh rails project and it works fine. There is
something else in my project that is quirked, and causing the errors
above.

Any ideas?

Jeff Hoffman
Alex Y. (Guest)
on 2006-01-07 11:38
(Received via mailing list)
Jeff Hoffman wrote:
> (in /Users/jkh/Development/assetstream)
> rake aborted!
> You have a nil object when you didn't expect it!
> You might have expected an instance of Array.
> The error occured while evaluating nil.[]
>
> Strangely, db_schema_export and db_schema_import work just fine. And my application runs 
fine. I am using MySQL, and it is configured correctly in database.yml. To make sure it 
wasn't a syntax error, I copied database.yml to a fresh rails project and it works fine. 
There is something else in my project that is quirked, and causing the errors above.
>
> Any ideas?
You may already have checked this, but if your tests are from an earlier
version of Rails, they're probably not using the current fixture syntax.
   It was one of the (very) few things that was broken in the 0.14 line.
Check http://ar.rubyonrails.com/classes/Fixtures.html to make sure your
ducks are in line :-)
This topic is locked and can not be replied to.