Hello,
Can someone tell me what I have done wrong?
I ran script/generate model CityZipMSA city:string state:string zip:integer MSA:integer
And then ran rake db:migrate
and I get the following error
(in /Users/MMyself/app_dev/property) rake aborted! An error has occurred, this and all later migrations canceled:
uninitialized constant CreateCityZipMsas
My migration file:
class CreateCityZipMSAs < ActiveRecord::Migration
def self.up
create_table :city_zip_msas do |t|
t.string :city
t.string :state
t.integer :zip
t.integer :MSA
t.timestamps
end
end
def self.down
drop_table :city_zip_msas
end
end
When I run rake db:migrate --trace
I get
(in /Users/MMyself/app_dev/property) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate rake aborted! An error has occurred, this and all later migrations canceled:
uninitialized constant CreateCityZipMsas /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:443:in
load_missing_constant' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:80:in
const_missing' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:92:inconst_missing' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.8/lib/active_support/inflector.rb:364:in
constantize' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.8/lib/active_support/inflector.rb:363:ineach' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.8/lib/active_support/inflector.rb:363:in
constantize' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.8/lib/active_support/core_ext/string/inflections.rb:162:inconstantize' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-2.3.8/lib/active_record/migration.rb:374:in
load_migration' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-2.3.8/lib/active_record/migration.rb:369:inmigration' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-2.3.8/lib/active_record/migration.rb:365:in
migrate' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-2.3.8/lib/active_record/migration.rb:491 /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-2.3.8/lib/active_record/migration.rb:565:incall' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-2.3.8/lib/active_record/migration.rb:565:in
ddl_transaction' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/database_statements.rb:136:intransaction' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-2.3.8/lib/active_record/transactions.rb:182:in
transaction' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-2.3.8/lib/active_record/migration.rb:565:inddl_transaction' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-2.3.8/lib/active_record/migration.rb:490:in
migrate' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-2.3.8/lib/active_record/migration.rb:477:ineach' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-2.3.8/lib/active_record>/migration.rb:477:in
migrate' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-2.3.8/lib/active_record/migration.rb:401:inup' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-2.3.8/lib/active_record/migration.rb:383:in
migrate' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/rails-2.3.8/lib/tasks/databases.rake:112 /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/rake-0.8.7/lib/rake.rb:636:incall' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/rake-0.8.7/lib/rake.rb:636:in
execute' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/rake-0.8.7/lib/rake.rb:631:ineach' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/rake-0.8.7/lib/rake.rb:631:in
execute' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/rake-0.8.7/lib/rake.rb:597:ininvoke_with_call_chain' /Users/MMyself/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/monitor.rb:242:in
synchronize' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/rake-0.8.7/lib/rake.rb:590:ininvoke_with_call_chain' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/rake-0.8.7/lib/rake.rb:583:in
invoke' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/rake-0.8.7/lib/rake.rb:2051:ininvoke_task' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/rake-0.8.7/lib/rake.rb:2029:in
top_level' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/rake-0.8.7/lib/rake.rb:2029:ineach' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/rake-0.8.7/lib/rake.rb:2029:in
top_level' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/rake-0.8.7/lib/rake.rb:2023:in
top_level' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/rake-0.8.7/lib/rake.rb:2001:inrun' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/rake-0.8.7/lib/rake.rb:1998:inrun' /Users/MMyself/.rvm/gems/ruby-1.8.7-p249/gems/rake-0.8.7/bin/rake:31 /Users/MMyself/.rvm/rubies/ruby-1.8.7-p249/bin/rake:24:in
load' /Users/MMyself/.rvm/rubies/ruby-1.8.7-p249/bin/rake:24