Problems migrating database 1.1.3 to 1.2
Added by Craig Efrein over 13 years ago
Hello all,
I'm having a little bit of trouble with migrating from 1.1 to 1.2. When I run the command
RAILS_ENV=production rake db:migrate
I get the following error
(in /opt/redmine) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! syntax error on line 78, col 0: `default:' /usr/local/lib/ruby/1.8/yaml.rb:133:in `load' /usr/local/lib/ruby/1.8/yaml.rb:133:in `load' /usr/local/lib/ruby/1.8/yaml.rb:144:in `load_file' /usr/local/lib/ruby/1.8/yaml.rb:143:in `open' /usr/local/lib/ruby/1.8/yaml.rb:143:in `load_file' /opt/redmine/lib/redmine/configuration.rb:82:in `load_from_yaml' /opt/redmine/lib/redmine/configuration.rb:41:in `load' /opt/redmine/lib/redmine/configuration.rb:65:in `[]' /opt/redmine/app/models/attachment.rb:46 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:184:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:291:in `require_or_load_without_engine_additions' /opt/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:451:in `load_missing_constant' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:106:in `const_missing' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:118:in `const_missing' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:463:in `load_missing_constant' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:106:in `const_missing' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:463:in `load_missing_constant' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:106:in `const_missing' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:463:in `load_missing_constant' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:106:in `const_missing' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:463:in `load_missing_constant' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:106:in `const_missing' /opt/redmine/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb:33:in `acts_as_attachable' /opt/redmine/app/models/message.rb:22 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:184:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:291:in `require_or_load_without_engine_additions' /opt/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:451:in `load_missing_constant' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:106:in `const_missing' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:118:in `const_missing' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/inflector.rb:364:in `constantize' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/inflector.rb:363:in `each' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/inflector.rb:363:in `constantize' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/core_ext/string/inflections.rb:162:in `constantize' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/observer.rb:157:in `observed_class' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/observer.rb:183:in `observed_classes' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/observer.rb:166:in `initialize' /usr/local/lib/ruby/1.8/singleton.rb:95:in `new' /usr/local/lib/ruby/1.8/singleton.rb:95:in `instance' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/observer.rb:38:in `instantiate_observers' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/observer.rb:36:in `each' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/observer.rb:36:in `instantiate_observers' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:15:in `define_dispatcher_callbacks' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/callbacks.rb:182:in `call' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/callbacks.rb:182:in `evaluate_method' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/callbacks.rb:166:in `call' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/callbacks.rb:90:in `run' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/callbacks.rb:90:in `each' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/callbacks.rb:90:in `send' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/callbacks.rb:90:in `run' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/callbacks.rb:276:in `run_callbacks' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:51:in `send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:51:in `run_prepare_callbacks' /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:631:in `prepare_dispatcher' /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:185:in `process' /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:113:in `send' /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:113:in `run' /opt/redmine/config/environment.rb:20 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:182:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:547:in `new_constants_in' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:182:in `require' /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/tasks/misc.rake:4 /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' /usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain' /usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 /usr/local/bin/rake:19:in `load' /usr/local/bin/rake:19
I did already run the rails upgrade
gem install -v=2.3.11 rails
Needless to say, I have been upgrading Redmine since 0.9.2 and this is the first time I've had issues. Luckily, I'm on a test machine and not the real one.
Replies (6)
RE: Problems migrating database 1.1.3 to 1.2 - Added by Alex A over 13 years ago
can u show your enviroment.rb file from redmine config directory?
RE: Problems migrating database 1.1.3 to 1.2 - Added by Craig Efrein over 13 years ago
Hello Alex,
Here it is. The environment.rb file from the redmine I just downloaded 1.2, not the version I'm migrating from 1.1.3.
environment.rb (2.51 KB) environment.rb | environment.rb |
RE: Problems migrating database 1.1.3 to 1.2 - Added by Alex A over 13 years ago
I suppose this error in ur redmine configuration file. Do u have configuration.yml file in redmine config directory?
RE: Problems migrating database 1.1.3 to 1.2 - Added by Craig Efrein over 13 years ago
Yes I have the configuration.yml in place. This apparently replaced the email.yml?
production: email_delivery: delivery_method: :smtp smtp_settings: address: "127.0.0.1" port: 25 authentication: :none domain: 'fqdn of the redmine host'
I noticed that it's in two places: production and default; what's the difference? Keep in mind that I'm running this command
RAILS_ENV=production rake db:migrate
I'm not sure however why the email configuration would prevent the database migration command from working.
RE: Problems migrating database 1.1.3 to 1.2 - Added by Alex A over 13 years ago
Try to remove configuration.yml and all e-mail setting replace into email.yml.
RE: Problems migrating database 1.1.3 to 1.2 - Added by Craig Efrein over 13 years ago
That was it, I copied over my old email.yml and renammed the configuration.yml to configuration.yml.bak. Now the migration works great.
Thank you for the help as always.