I'm trying to update a fairly ancient install of radiant and am having some problems. It appears that Radiant::Initializer.run (called by config/environment.rb) is attempting to access the database before the migrations have run. Bad monkey.

Anyone have any ideas on how to get this to work?

~~ Brian

Here's what I did:

$ radiant radiant_new
$ cp radiant/config/database.yml radiant_new/config/database.yml
$ cd radiant_new
$ script/version
Radiant 0.6.9
$ rake production db:migrate
(in ~/radiant_new)
rake aborted!
Mysql::Error: Unknown column 'class_name' in 'field list': SELECT DISTINCT class_name FROM pages WHERE class_name <> '' AND class_name IS NOT NULL

(See full trace by running task with --trace)
$ rake production db:migrate --trace
(in ~/radiant_new)
** Invoke production (first_time)
** Execute production
** Invoke environment (first_time)
** Execute environment
rake aborted!
Mysql::Error: Unknown column 'class_name' in 'field list': SELECT DISTINCT class_name FROM pages WHERE class_name <> '' AND class_name IS NOT NULL /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.9/vendor/rails/ activerecord/lib/active_record/connection_adapters/abstract_adapter.rb: 150:in `log' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.9/vendor/rails/ activerecord/lib/active_record/connection_adapters/mysql_adapter.rb: 281:in `execute' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.9/vendor/rails/ activerecord/lib/active_record/connection_adapters/mysql_adapter.rb: 273:in `select_rows' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.9/vendor/rails/ activerecord/lib/active_record/connection_adapters/abstract/ database_statements.rb:27:in `select_values' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.9/app/models/page.rb: 195:in `load_subclasses' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.9/lib/radiant/ extension_loader.rb:96:in `activate_extensions' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.9/lib/radiant/ initializer.rb:110:in `after_initialize' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.9/vendor/rails/railties/ lib/initializer.rb:114:in `process' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.9/vendor/rails/railties/ lib/initializer.rb:49:in `send' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.9/vendor/rails/railties/ lib/initializer.rb:49:in `run' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.9/lib/radiant/ initializer.rb:89:in `run'
~/radiant_new/config/environment.rb:12
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.9/vendor/rails/railties/ lib/tasks/misc.rake:3
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:238:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in `invoke'
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.9/lib/tasks/ environments.rake:10
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:238:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in `invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in `invoke_task' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19

_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to