0

I was trying to change a column datatype and initially wrote a rails g migration command to change the column's datatype; however, the process in my terminal window just hung up and appeared to not do anything. So then I proceeded to make a class migration file without the generate command thinking that would work. It also hung up... finally found I forgot to comment out a function i was testing in one my initializers and this was causing it to hang. Problem is now when I run rake db:migrate it errors out because of the migration i initially tried to generate. Below is the error I'm getting. Anyone know how I can solve this? Thanks!

rake aborted!
An error has occurred, this and all later migrations canceled:

uninitialized constant ChangeColumnInstitutionidToPerson/var/lib/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/inflector/methods.rb:230:in `block in constantize'
daveomcd
  • 6,367
  • 14
  • 83
  • 137

1 Answers1

0

Fixed this by making sure my class name matched the file name.

Example:

file name: 20130607135506_change_column_institutionid_to_person.rb

class name: ChangeColumnInstitutionidToPerson < ActiveRecord:Migration

daveomcd
  • 6,367
  • 14
  • 83
  • 137