1

I installed the latest version of redmine with rails 3.2.6. It works fine in development on a mysql database, but I uploaded it to heroku, which uses postgres. I get this error related to the Setting model and I can't view any page.

Processing by WelcomeController#index as HTML
Completed 500 Internal Server Error in 5ms

ActiveRecord::StatementInvalid (PG::Error: ERROR:  relation "settings" does not exist
:SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"settings"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
):
app/models/setting.rb:152:in `check_cache'
app/controllers/application_controller.rb:81:in `user_setup'

I tried debugging it but it seems like anything related to the settings model has problems. Just wondered if anyone ran into this problem or can offer insight.

4

1 に答える 1

0

redmine のウェルカム ページ (ブラウザ: localhost:3000) に入ると、同じ 500 内部エラーが発生しました。コンソールでは、同じエラー メッセージが表示されます。

... statementInvalid ... リレーション設定が存在しません ...

だからアルティメーションの足跡をたどって戻ってやる

$ rake db:migrate
$ rake redmine:load_default_data
$ rails server

次に、ブラウザに移動し、localhost:3000 にアクセスします。エラーがなくなり、redmine のスタート ページが表示されるようになりました。

于 2014-10-22T10:03:28.967 に答える