I'm trying to upgrade my redmine from 1.3.0 to 2.0.0, but I have problems with the database migration. When I run the command:
rake db:migrate RAILS_ENV=production
it shows an error like
rake aborted!
uninitialized constant RAILS_ENV
My error log is:
ActiveRecord::SubclassNotFound (The single-table inheritance mechanism failed to locate the subclass: 'GoogleAppsAuthSource'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite AuthSource.inheritance_column to use another column for that information.):
app/models/user.rb:139:in `try_to_login'
app/controllers/account_controller.rb:143:in `password_authentication'
app/controllers/account_controller.rb:138:in `authenticate_user'
app/controllers/account_controller.rb:30:in `login'
Here is the list of plugin that I am using in my old redmine:
Google Apps plugin
Redmine Code Review plugin
Redmine Hudson plugin
If anyone else stumbles here there are two ways to fix the problem
Manually set the column name to something pointless:
self.inheritance_column = :_type_disabled
See: http://apidock.com/rails/ActiveRecord/Base/inheritance_column/class