Tests fail after activerecord rename_column

I’ve renamed a column in an activerecord table by migrating. I
searched and changed all references from to in source / tests.

However, a lot of my tests now fail with errors of the type :
SQLException … table has no column named .

I also did a grep and can’t find any references to
in the project directory.

Which files could be using the ? Are there some
binary files that I need to clear ? I’m using Rails 3.

You might need to run rake db:test:prepare.

On Mar 22, 2011, at 12:46 PM, sreid wrote:

Which files could be using the ? Are there some
binary files that I need to clear ? I’m using Rails 3.

I’ll ask the stupid question first – did you restart the server?

Walter

On 22 March 2011 19:31, djangst [email protected] wrote:

You might need to run rake db:test:prepare.

If the test database was still the old format then I would have
expected the error when running the tests to be of the form
SQLException … table has no column named
rather than no column

@OP if your original post was incorrect and the error is saying that
there is no column then I think djangst is probably
correct. If your original post is correct then you must be
referencing the old column name somewhere. Have a look in test.log
and see if that gives any clues.

Colin