I’m testing things out for our eventual rollout of 0.6 and I’m
receiving this error when running rake db:migrate (or rake db:migrate
production)
"undefinded local variable of method ‘class_name’ for #<Page:
0x27a850>’
0.5.2 was installed and working OK on mysql (pulled the source, not
from the gem)
But the MergeBehaviorsAndPages migration seems to fail every time.
The error exists because the migration calls save!, which attempts to
validate, which uses the class_name column which is created in
migration 11 (app/models/page.rb:199). I don’t know an easy way to
fix that. It works on an empty database because there are no pages
to call save on. If I can get it to work, I’ll let the list know.
Uh-oh. I’m really hoping there’s some better advice out there, but
thanks Nancy.
I’m migrating from a fresh directory with only the appropriate config
information changed. I’m not using any but the default behaviors, and
all of my gems are up to date.
The error exists because the migration calls save!, which attempts to
validate, which uses the class_name column which is created in
migration 11 (app/models/page.rb:199). I don’t know an easy way to
fix that. It works on an empty database because there are no pages
to call save on. If I can get it to work, I’ll let the list know.