Forum: Radiant CMS undefined local variable or method `class_name' error when m

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Edf075fd42556b6c8b3506cf6c32cb64?d=identicon&s=25 Sharon Clift (Guest)
on 2007-04-25 13:35
(Received via mailing list)
I am trying to migrage our SQL database from 0.5.2 to 0.6.

When I run rake production db:migrate I receive the following error

C:\RailsApps\Radiant6>rake production db:migrate
(in C:/RailsApps/Radiant6)
Extensions cannot be used until Radiant migrations are up to date.
== MergeBehaviorsAndPages: migrating
==========================================
== MergeBehaviorsAndPages: converting behavior names to class names
===========
rake aborted!
undefined local variable or method `class_name' for #<Page:0x46902cc>

I have no idea where to go from here and would be greatful for any help.
The full trace is as below.

C:\RailsApps\Radiant6>rake production db:migrate --trace
(in C:/RailsApps/Radiant6)
** Invoke production (first_time)
** Execute production
** Invoke environment (first_time)
** Execute environment
Extensions cannot be used until Radiant migrations are up to date.
** Invoke db:migrate (first_time)
** Invoke environment
** Execute db:migrate
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
== MergeBehaviorsAndPages: migrating
==========================================
== MergeBehaviorsAndPages: converting behavior names to class names
===========
rake aborted!
undefined local variable or method `class_name' for #<Page:0x4695cf4>
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/activerecord/l
ib/activ
e_record/base.rb:1860:in `method_missing'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/app/models/page.rb:199:in
`valid_cl
ass_name'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/activerecord/l
ib/activ
e_record/validations.rb:818:in `send'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/activerecord/l
ib/activ
e_record/validations.rb:818:in `run_validations'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/activerecord/l
ib/activ
e_record/validations.rb:816:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/activerecord/l
ib/activ
e_record/validations.rb:816:in `run_validations'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/activerecord/l
ib/activ
e_record/validations.rb:780:in `valid_without_callbacks?'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/activerecord/l
ib/activ
e_record/callbacks.rb:299:in `valid?'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/activerecord/l
ib/activ
e_record/validations.rb:761:in `save_without_transactions!'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/activerecord/l
ib/activ
e_record/transactions.rb:133:in `save!'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/activerecord/l
ib/activ
e_record/connection_adapters/abstract/database_statements.rb:59:in
`transaction'

c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/activerecord/l
ib/activ
e_record/transactions.rb:95:in `transaction'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/activerecord/l
ib/activ
e_record/transactions.rb:121:in `transaction'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/activerecord/l
ib/activ
e_record/transactions.rb:133:in `save!'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/db/migrate//010_merge_behav
iors_and
_pages.rb:17:in `real_up'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/db/migrate//010_merge_behav
iors_and
_pages.rb:14:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/db/migrate//010_merge_behav
iors_and
_pages.rb:14:in `real_up'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/activerecord/l
ib/activ
e_record/migration.rb:212:in `send'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/activerecord/l
ib/activ
e_record/migration.rb:212:in `migrate'
c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/activerecord/l
ib/activ
e_record/migration.rb:212:in `migrate'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/activerecord/l
ib/activ
e_record/migration.rb:335:in `migrate'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/activerecord/l
ib/activ
e_record/migration.rb:330:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/activerecord/l
ib/activ
e_record/migration.rb:330:in `migrate'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/activerecord/l
ib/activ
e_record/migration.rb:297:in `up'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/activerecord/l
ib/activ
e_record/migration.rb:288:in `migrate'
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/railties/lib/t
asks/dat
abases.rake:7
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `call'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:369:in `invoke'
c:/ruby/lib/ruby/1.8/thread.rb:135:in `synchronize'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `invoke'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/bin/rake:7
c:/ruby/bin/rake.bat:20:in `load'
c:/ruby/bin/rake.bat:20

C:\RailsApps\Radiant6>

Many thanks

Sharon Clift

This e-mail has been scanned for all viruses by MessageLabs.
8802b1fa1b53e2197beea9454244f847?d=identicon&s=25 Sean Cribbs (Guest)
on 2007-04-25 15:02
(Received via mailing list)
Sharon,

I just committed a change that fixes this issue.  Try running rake
radiant:freeze:edge in the directory of your radiant instance, then try
to migrate again.  radiant:freeze:edge will only work if you have the
command-line Subversion installed.

Sean
This topic is locked and can not be replied to.