Hi Ken K.,
It is called name convention in rails. If your class is CreateVendors,
your migration file should be xxx_create_vendors.rb …
[mailto:email@example.com] On Behalf Of Ken K.
Sent: Tuesday, May 16, 2006 2:04 PM
Subject: RE: [Rails] rake aborted when adding a column
I fixed it by changing the name of the migration from 002_ssn.rb to
002_add_ssn.rb. I have no idea why that worked, but it did the trick.
-------- Original Message -------- Subject: [Rails] rake aborted when adding a column From: Ken K. <firstname.lastname@example.org> Date: Tue, May 16, 2006 1:23 pm To: email@example.com I'm having a silly little problem with migrations. All I'm
trying to do is to add an SSN column to my Employees table. I generated
a migration which looks like:
class AddSsn < ActiveRecord::Migration def self.up add_column :employees, :ssn, :string end def self.down remove_column :employees, :ssn end end When I run this, however, I get: >rake db:migrate (in C:/workspace/hr) rake aborted! uninitialized constant Ssn I tried running with --trace but I don't see how that helped. I
did have the migration syntax wrong a couple of times, but now even
though I think it’s fine, it still doesn’t work.
Any suggestions would be appreciated. I'm running Ruby 1.8.4 with Rails 1.1.2 on Windows, btw. Ken K. -- Kenneth A. Kousen, Ph.D. President Kousen IT, Inc. http://www.kousenit.com <http://www.kousenit.com/> firstname.lastname@example.org
_______________________________________________ Rails mailing list email@example.com http://lists.rubyonrails.org/mailman/listinfo/rails