Project

General

Profile

syntax error on line 80, col 0: `default:'

Added by e tec over 12 years ago

I am getting this error when trying:

rake db:migrate RAILS_ENV=production

I went to a few of the files in the stack trace but don't know enough about Ruby to troubleshoot this yet. Note, it seems that the database connection is working correctly because editing the database.yml file to incorrect values gives an oracle TNS database error.

This is the current error:

(in /opt/ruby/redmine/redmine-1.2)
Please install RDoc 2.4.2+ to generate documentation.
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
syntax error on line 80, 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/ruby/redmine/redmine-1.2/lib/redmine/configuration.rb:82:in `load_from_yaml'
/opt/ruby/redmine/redmine-1.2/lib/redmine/configuration.rb:41:in `load'
/opt/ruby/redmine/redmine-1.2/lib/redmine/configuration.rb:65:in `[]'
/opt/ruby/redmine/redmine-1.2/app/models/attachment.rb:46
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:54:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:54:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:184:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:291:in `require_or_load_without_engine_additions'
/opt/ruby/redmine/redmine-1.2/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.14/lib/active_support/dependencies.rb:451:in `load_missing_constant'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:106:in `const_missing'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:118:in `const_missing'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:463:in `load_missing_constant'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:106:in `const_missing'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:463:in `load_missing_constant'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:106:in `const_missing'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:463:in `load_missing_constant'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:106:in `const_missing'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:463:in `load_missing_constant'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:106:in `const_missing'
/opt/ruby/redmine/redmine-1.2/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb:33:in `acts_as_attachable'
/opt/ruby/redmine/redmine-1.2/app/models/message.rb:22
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:54:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:54:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:184:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:291:in `require_or_load_without_engine_additions'
/opt/ruby/redmine/redmine-1.2/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.14/lib/active_support/dependencies.rb:451:in `load_missing_constant'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:106:in `const_missing'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:118:in `const_missing'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/inflector.rb:364:in `constantize'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/inflector.rb:363:in `each'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/inflector.rb:363:in `constantize'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/core_ext/string/inflections.rb:162:in `constantize'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/observer.rb:157:in `observed_class'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/observer.rb:183:in `observed_classes'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.14/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.14/lib/active_record/observer.rb:38:in `instantiate_observers'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/observer.rb:36:in `each'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/observer.rb:36:in `instantiate_observers'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:15:in `define_dispatcher_callbacks'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/callbacks.rb:182:in `call'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/callbacks.rb:182:in `evaluate_method'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/callbacks.rb:166:in `call'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/callbacks.rb:90:in `run'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/callbacks.rb:90:in `each'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/callbacks.rb:90:in `send'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/callbacks.rb:90:in `run'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/callbacks.rb:276:in `run_callbacks'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:51:in `send'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:51:in `run_prepare_callbacks'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/initializer.rb:631:in `prepare_dispatcher'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/initializer.rb:185:in `process'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/initializer.rb:113:in `send'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/initializer.rb:113:in `run'
/opt/ruby/redmine/redmine-1.2/config/environment.rb:20
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:182:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:547:in `new_constants_in'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:182:in `require'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.14/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

Environment:

e tec wrote:

Additional Info:

ruby -v
  • ruby 1.8.7 (2008-05-31 patchlevel 0) [x86_64-linux]
rails -v
  • Rails 2.3.14
  • Database: Oracle 11g Enterprise
  • Mongrel (but I don't think I'm at this point in the install yet)

Previous Redmine version: 1.1.2, trying to migrate to 1.2 release on a new machine.

The previous install was on MySQL. All tables have been migrated over to the Oracle 11g Database successfully.

Running Oracle Linux.


Any suggestions appreciated!


Replies (5)

RE: syntax error on line 80, col 0: `default:' - Added by e tec over 12 years ago

I tried removing the plugins directory and running

rake db:migrate RAILS_ENV=production

..once again and got a new error message ("Child already added"):

(in /opt/ruby/redmine/redmine-1.2)
Please install RDoc 2.4.2+ to generate documentation.
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
Child already added
/opt/ruby/redmine/redmine-1.2/lib/redmine/menu_manager.rb:77:in `add'
/opt/ruby/redmine/redmine-1.2/lib/redmine/menu_manager.rb:371:in `push'
/opt/ruby/redmine/redmine-1.2/lib/redmine.rb:153
/opt/ruby/redmine/redmine-1.2/lib/redmine/menu_manager.rb:301:in `map'
/opt/ruby/redmine/redmine-1.2/lib/redmine.rb:152
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:184:in `require'
/opt/ruby/redmine/redmine-1.2/config/initializers/30-redmine.rb:5
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:173:in `load_without_new_constant_marking'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:173:in `load'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/initializer.rb:622:in `load_application_initializers'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/initializer.rb:621:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/initializer.rb:621:in `load_application_initializers'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/initializer.rb:176:in `process'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/initializer.rb:113:in `send'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/initializer.rb:113:in `run'
/opt/ruby/redmine/redmine-1.2/config/environment.rb:20
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:182:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:547:in `new_constants_in'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:182:in `require'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.14/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

Then replaced the plugins directory, and tried:

rake db:migrate:upgrade_plugin_migrations RAILS_ENV=production

..and got the same error as before (syntax error on line 80, col 0: `default:').

Any ideas?

RE: syntax error on line 80, col 0: `default:' - Added by Etienne Massip over 12 years ago

I wonder if the default configuration.yml file is not badly formatted, check the email notification settings in this file?

RE: syntax error on line 80, col 0: `default:' - Added by e tec over 12 years ago

Well, you pointed me in the right direction. About half of my configuration.yml file had double spaces before each line, which was causing errors in some places. Also, a couple uncommented lines were causing syntax errors, so I commented those out. I'm not sure why these were causing errors.. the only thing that I changed in the configuration.yml file from default was adding in our production email settings. It looks like the spaces and non-commented areas match the example config file.

Now that that is fixed, I am starting to get errors like indicated elsewhere specific to using an Oracle DB. I'll start working on those and report back here if I get stuck.

Thanks again!

RE: syntax error on line 80, col 0: `default:' - Added by Etienne Massip over 12 years ago

Oracle is not well (and not officially) supported by Redmine, you should reconsider this choice if you don't feel confortable with patching.

You'll find some useful information in #944.

RE: syntax error on line 80, col 0: `default:' - Added by e tec over 12 years ago

Awesome! The DB updates and patch in http://www.redmine.org/boards/1/topics/24394 worked for me. I get no errors doing the rakes now. Now to setup Mongrel, and test everything out..

Thanks for the help!

etec

    (1-5/5)