1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Ubuntu 15.04 Redmine

1
Posted at

Ubuntu を 14.10 から 15.04 にアップグレードしたらまた Redmine が動かなくなった。
と言うか、Redmine のパッケージが削除されていたので、apt でインストールしなおしたが
動かない。トップページで Internal Server Error が出た。
/var/log/redmine/default/production.log を見ると

NoMemoryError (failed to allocate memory):
  app/models/user.rb:327:in `time_zone'

メモリが確保できなくてエラーになっているようだ。
/usr/share/redmine/app/models/user.rb を下記の様に修正

diff -u user.rb.orig user.rb
--- user.rb.orig        2015-04-30 07:48:39.804301992 +0900
+++ user.rb     2015-04-30 07:49:08.397988334 +0900
@@ -324,7 +324,7 @@
   end
 
   def time_zone
-    @time_zone ||= (self.pref.time_zone.blank? ? nil : ActiveSupport::TimeZone[self.pref.time_zone])
+    @time_zone = nil
   end
 
   def force_default_language?

とりあえずこれで動くようになったけども、今度は個人設定の所でもやはりタイムゾーン絡みで
NoMemoryError を出していた。今の所個人設定を変更する予定は無いので、暇な時にきちんと原因を探す事にして、当面このままかな。

おまけのメモ。Redmine をデバッグするには /usr/share/redmine/config/environments/production.rb の中身を書き換えて、Apache を再起動するとブラウザ側にもエラーが出てくる。
もっと良い方法有ったら教えて下さい。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?