Undefined local variable or method `class_name' error when m

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:inmethod_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:insend’
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:ineach’
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:invalid_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:insave_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:intransaction’

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:intransaction’
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:inreal_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:inreal_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:inmigrate’
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:inmigrate’
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:ineach’
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:inup’
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:incall’
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:ineach’
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:ininvoke’
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:ininvoke’
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:ineach’
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:inload’
c:/ruby/bin/rake.bat:20

C:\RailsApps\Radiant6>

Many thanks

Sharon C.

This e-mail has been scanned for all viruses by MessageLabs.

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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs