I''ve renamed a column in an activerecord table by migrating. I searched and changed all references from <old column name> to <new column name> in source / tests. However, a lot of my tests now fail with errors of the type : SQLException ... table has no column named <old column name>. I also did a grep and can''t find any references to <old column name> in the project directory. Which files could be using the <old column name> ? Are there some binary files that I need to clear ? I''m using Rails 3. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
You might need to run `rake db:test:prepare`. On Mar 22, 12:46 pm, sreid <sa...-QqoMRuB2QvA51pO8USHC0gC/G2K4zDHf@public.gmane.org> wrote:> However, a lot of my tests now fail with errors of the type : > SQLException ... table has no column named <old column name>.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mar 22, 2011, at 12:46 PM, sreid wrote:> I''ve renamed a column in an activerecord table by migrating. I > searched and changed all references from <old column name> to <new > column name> in source / tests. > > However, a lot of my tests now fail with errors of the type : > SQLException ... table has no column named <old column name>. > > I also did a grep and can''t find any references to <old column name> > in the project directory. > > Which files could be using the <old column name> ? 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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 22 March 2011 19:31, djangst <djangst-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <new column name> rather than no column <old column name> @OP if your original post was incorrect and the error *is* saying that there is no column <new name> 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> > On Mar 22, 12:46 pm, sreid <sa...-QqoMRuB2QvA51pO8USHC0gC/G2K4zDHf@public.gmane.org> wrote: >> However, a lot of my tests now fail with errors of the type : >> SQLException ... table has no column named <old column name>.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.