Redmine を 1.3.0 から 2.0.0 にアップグレードしようとしていますが、データベースの移行で問題が発生しています。次のコマンドを実行すると、
rake db:migrate RAILS_ENV=production
次のようなエラーが表示されます
rake aborted!
uninitialized constant RAILS_ENV
エラーログは次のとおりです:
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'
以下は、古い Redmine で使用しているプラグインのリストです。
Google アプリ プラグイン
Redmine コードレビュープラグイン
Redmine Hudsonプラグイン
ベストアンサー1
もし誰かがここでつまずいた場合、問題を解決するには2つの方法があります
- type という名前の列を使用しないでください。
列名を手動で無意味なものに設定します。
self.inheritance_column = :_type_disabled