Defect #18994
closedundefined local variable or method `config' for main:Object when upgrading from 1.3.1 to 2.6.0
0%
Description
Hello,
I'm quite a bit confused regarding the upgrade procedure from redmine 1.3.1 to 2.6.0. My redmine was working fine in 1.3.1 but I need to upgrade it.
After fixing issue with ruby version, fixing problem with passenger / no passenger, I'm now in front off a error that I canno't understand:
/var/www/plugins/engines/init.rb:3:in `<top (required)>': undefined local variable or method `config' for main:Object (NameError) from /var/www/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require' from /var/www/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `block in require' from /var/www/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:in `load_dependency' from /var/www/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require' from /var/www/lib/redmine/plugin.rb:150:in `block in load' from /var/www/lib/redmine/plugin.rb:141:in `each' from /var/www/lib/redmine/plugin.rb:141:in `load' from /var/www/config/initializers/30-redmine.rb:19:in `<top (required)>' from /var/www/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in `load' from /var/www/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in `block in load' from /var/www/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:in `load_dependency' from /var/www/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in `load' from /var/www/vendor/bundle/ruby/1.9.1/gems/railties-3.2.19/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>' from /var/www/vendor/bundle/ruby/1.9.1/gems/railties-3.2.19/lib/rails/engine.rb:592:in `each' from /var/www/vendor/bundle/ruby/1.9.1/gems/railties-3.2.19/lib/rails/engine.rb:592:in `block in <class:Engine>' from /var/www/vendor/bundle/ruby/1.9.1/gems/railties-3.2.19/lib/rails/initializable.rb:30:in `instance_exec' from /var/www/vendor/bundle/ruby/1.9.1/gems/railties-3.2.19/lib/rails/initializable.rb:30:in `run' from /var/www/vendor/bundle/ruby/1.9.1/gems/railties-3.2.19/lib/rails/initializable.rb:55:in `block in run_initializers' from /var/www/vendor/bundle/ruby/1.9.1/gems/railties-3.2.19/lib/rails/initializable.rb:54:in `each' from /var/www/vendor/bundle/ruby/1.9.1/gems/railties-3.2.19/lib/rails/initializable.rb:54:in `run_initializers' from /var/www/vendor/bundle/ruby/1.9.1/gems/railties-3.2.19/lib/rails/application.rb:136:in `initialize!' from /var/www/vendor/bundle/ruby/1.9.1/gems/railties-3.2.19/lib/rails/railtie/configurable.rb:30:in `method_missing' from /var/www/config/environment.rb:14:in `<top (required)>' from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from script/about:4:in `<main>'
You can found the full report of the exception in the attachment file.
operating system: debian wheezy
cd /var/www/ && cat config/database.yuml
# MySQL database configuration production: adapter: mysql2 database: my_database host: localhost username: mu_username password: a_password encoding: utf8 test: adapter: mysql2 database: my_database_test host: localhost username: root password: password encoding: utf8
mysql -u root -pmy_password -A -e "show variables like 'version'"
+---------------+----------------------+ | Variable_name | Value | +---------------+----------------------+ | version | 5.5.41-0+wheezy1-log | +---------------+----------------------+
rails --version
Rails 3.2.19
ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
ruby script/about
cat /var/www/plugins/engines/init.rb
# Only call Engines.init once, in the after_initialize block so that Rails # plugin reloading works when turned on config.after_initialize do Engines.init(initializer) if defined? :Engines end
dependancies.db file is also in attachment.
I'm not a ruby developer, just and end user of redmine, and does not understand why I have all theses issues.
Can you help me? my redmine is not working anymore, and it's a problem.
Your help would be very usefull
Files
Updated by Toshi MARUYAMA over 10 years ago
- Status changed from New to Closed
- Resolution set to Invalid
plugins/engines/init.rb is garbage.
source:tags/2.6.1/plugins
Updated by David M over 10 years ago
- Status changed from Closed to Reopened
Hello,
I'm not sure to understand your answer: you mean instead of using 2.6 I should use 2.6.1 right?
Any tips will be helpfull.
Regards
Updated by Toshi MARUYAMA over 10 years ago
- Status changed from Reopened to Closed
David M wrote:
Any tips will be helpfull.
source:tags/1.4.7/vendor/plugins/engines/init.rb
I should use 2.6.1 right?