Defect #14607
closedrake redmine:load_default_data Error
Added by jun yang over 11 years ago. Updated over 11 years ago.
0%
Description
Hi,when I install redmine,execute RAILS_ENV=production rake redmine:load_default_data,
Error:undefined method 'association_class' for nil:NilClass
Environment:
Redmine version 2.3.1.stable
Ruby version 1.9.3 (x86_64-linux)
Rails version 3.2.13
Environment production
Database adapter Mysql2
Centos 6.4 (Final)
Related issues
Updated by Jimmy Shoes over 11 years ago
The same for me. This is the trace error:
$ sudo RAILS_ENV=production rake redmine:load_default_data --trace- Invoke redmine:load_default_data (first_time)
- Invoke environment (first_time)
- Execute environment
- Execute redmine:load_default_data
Select language: ar, az, bg, bs, ca, cs, da, de, el, en, en-GB, es, et, eu, fa, fi, fr, gl, he, hr, hu, id, it, ja, ko, lt, lv, mk, mn, nl, no, pl, pt, pt-BR, ro, ru, sk, sl, sq, sr, sr-YU, sv, th, tr, uk, vi, zh, zh-TW [en] es
====================================
rake aborted!
undefined method `association_class' for nil:NilClass
/var/lib/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/associations.rb:160:in `association'
/var/lib/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/associations/builder/association.rb:51:in `block in define_writers'
/var/www/redmine/lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb:146:in `save_custom_field_values'
/var/lib/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:453:in `_run__32680709__save__179041616__callbacks'
/var/lib/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in `__run_callback'
/var/lib/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
/var/lib/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:in `run_callbacks'
/var/lib/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/callbacks.rb:264:in `create_or_update'
/var/lib/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/persistence.rb:104:in `save!'
/var/lib/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/validations.rb:56:in `save!'
/var/lib/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/attribute_methods/dirty.rb:33:in `save!'
/var/lib/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:264:in `block in save!'
/var/lib/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'
/var/lib/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/var/lib/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:208:in `transaction'
/var/lib/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:311:in `with_transaction_returning_status'
/var/lib/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:264:in `save!'
/var/lib/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/validations.rb:41:in `create!'
/var/www/redmine/lib/redmine/default_data/loader.rb:168:in `block in load'
/var/lib/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/var/lib/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:208:in `transaction'
/var/www/redmine/lib/redmine/default_data/loader.rb:41:in `load'
/var/www/redmine/lib/tasks/load_default_data.rake:25:in `block (2 levels) in <top (required)>'
/var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:236:in `call'
/var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:236:in `block in execute'
/var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:231:in `each'
/var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:231:in `execute'
/var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:175:in `block in invoke_with_call_chain'
/usr/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:168:in `invoke_with_call_chain'
/var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:161:in `invoke'
/var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:149:in `invoke_task'
/var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:106:in `each'
/var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:106:in `block in top_level'
/var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:115:in `run_with_threads'
/var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:100:in `top_level'
/var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:78:in `block in run'
/var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:75:in `run'
/var/lib/gems/1.9.1/gems/rake-10.1.0/bin/rake:33:in `<top (required)>'
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19:in `<main>'
Tasks: TOP => redmine:load_default_data
Thank you so much.
Updated by Jean-Philippe Lang over 11 years ago
- Category set to Administration
- Status changed from New to Closed
- Assignee set to Jean-Philippe Lang
- Target version set to 2.3.3
- Resolution set to Fixed
Fixed in r12076. As a workaround, you can skip this step during the installation and load default data from the administration console which doesn't raise this error.
Thanks for pointing this out.
Updated by Jimmy Shoes over 11 years ago
I have applied to my load_default_data.rake file the changes from the r12076 and it works perfectly.
Thank you so much for your support.
Updated by Go MAEDA over 4 years ago
- Related to Defect #33310: Warnings while running redmine:load_default_data rake task added