0.7.3 で 500 Internal Server Error

388 views
Skip to first unread message

kirara397

unread,
Jul 18, 2008, 4:22:16 AM7/18/08
to Redmine Users (japanese)
こんにちは。

先日のRedmine 0.7.3リリース
http://redmine.jp/redmine_today/2008/07/06/redmine-0-7-3/

を受け、Redmineをsvn updateしました。
その後、ページによってInternal errorが出るようになってしまいました。

[動作環境]
OS:Windows Server 2003 Standard Edition SP2
DB:SQLite
ruby 1.8.6 (2007-09-24 patchlevel 111)
rails (2.1.0)
Redmine:0.7.devel.1675

[アクセスできるページ]
* /my/page
* /projects
* /projects/activity
* /projects/add
* /admin
* /issues

[エラーになるページ]
* /
* /my/account
* /projects/show/xxx
* /issues/show/xxx

ログを見ると、下記のようなエラー内容が記録されます(長いです):

<production.log>
ActionView::TemplateError (There is no rule called 'default' in the ja
rules.) on line #15 of issues/show.rhtml:
12: <div class="issue <%= "status-#{@issue.status.position} priority-
#{@issue.priority.position}" %>">
13: <h3><%=h @issue.subject %></h3>
14: <p class="author">
15: <%= authoring @issue.created_on, @issue.author %>.
16: <%= l(:label_updated_time,
distance_of_time_in_words(Time.now, @issue.updated_on)) + '.' if
@issue.created_on != @issue.updated_on %>
17: </p>
18:

vendor/plugins/gloc-1.1.0/lib/gloc-internal.rb:107:in `_l_rule'
vendor/plugins/gloc-1.1.0/lib/gloc.rb:44:in `lwr_'
vendor/plugins/gloc-1.1.0/lib/gloc.rb:36:in `lwr'
vendor/plugins/gloc-1.1.0/lib/gloc-rails-text.rb:38:in
`distance_of_time_in_words'
app/helpers/application_helper.rb:94:in `authoring'
app/views/issues/show.rhtml:15:in
`_run_erb_47app47views47issues47show46rhtml'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/
base.rb:338:in `send'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/
base.rb:338:in `execute'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/
template_handlers/compilable.rb:29:in `send'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/
template_handlers/compilable.rb:29:in `render'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/
template.rb:35:in `render'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/
template.rb:22:in `render_template'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/
base.rb:245:in `render_file'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/base.rb:1108:in `render_for_file'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/base.rb:868:in `render_with_no_layout'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/layout.rb:251:in `render_without_benchmark'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/benchmarking.rb:51:in `render'
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/
active_support/core_ext/benchmark.rb:8:in `realtime'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/benchmarking.rb:51:in `render'
app/controllers/issues_controller.rb:106:in `show'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/mime_responds.rb:131:in `call'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/mime_responds.rb:131:in `custom'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/mime_responds.rb:160:in `call'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/mime_responds.rb:160:in `respond'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/mime_responds.rb:154:in `each'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/mime_responds.rb:154:in `respond'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/mime_responds.rb:107:in `respond_to'
app/controllers/issues_controller.rb:105:in `show'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/base.rb:1162:in `send'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/base.rb:1162:in `perform_action_without_filters'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/filters.rb:580:in `call_filters'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/filters.rb:573:in `perform_action_without_benchmark'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/benchmarking.rb:68:in
`perform_action_without_rescue'
C:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/benchmarking.rb:68:in
`perform_action_without_rescue'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/rescue.rb:201:in `perform_action_without_caching'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/caching/sql_cache.rb:13:in `perform_action'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/
active_record/connection_adapters/abstract/query_cache.rb:33:in
`cache'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/
active_record/query_cache.rb:8:in `cache'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/caching/sql_cache.rb:12:in `perform_action'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/base.rb:529:in `send'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/base.rb:529:in `process_without_filters'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/filters.rb:569:in
`process_without_session_management_support'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/session_management.rb:130:in `process'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/base.rb:389:in `process'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/dispatcher.rb:149:in `handle_request'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/dispatcher.rb:107:in `dispatch'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/dispatcher.rb:104:in `synchronize'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/dispatcher.rb:104:in `dispatch'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/dispatcher.rb:120:in `dispatch_cgi'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/dispatcher.rb:35:in `dispatch'
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/
mongrel/rails.rb:76:in `process'
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/
mongrel/rails.rb:74:in `synchronize'
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/
mongrel/rails.rb:74:in `process'
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/
mongrel.rb:159:in `process_client'
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/
mongrel.rb:158:in `each'
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/
mongrel.rb:158:in `process_client'
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/
mongrel.rb:285:in `run'
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/
mongrel.rb:285:in `initialize'
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/
mongrel.rb:285:in `new'
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/
mongrel.rb:285:in `run'
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/
mongrel.rb:268:in `initialize'
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/
mongrel.rb:268:in `new'
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/
mongrel.rb:268:in `run'
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/
mongrel/configurator.rb:282:in `run'
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/
mongrel/configurator.rb:281:in `each'
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/
mongrel/configurator.rb:281:in `run'
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/
mongrel_rails:128:in `run'
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/
mongrel/command.rb:212:in `run'
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/
mongrel_rails:281
C:/ruby/bin/mongrel_rails:19:in `load'
C:/ruby/bin/mongrel_rails:19

Rendering d:/redmine/public/500.html (500 Internal Server Error)
</production.log>

このアップグレードの際、
rake db:migrate RAILS_ENV="production"
を実行したところ、Railsおよび関連アプリを2.1.0にするよう要求されてそれに従いました。
なんとなくその辺が原因かなーと思っていますが解決の糸口が掴めず、途方にくれています。
どなたかお知恵を貸してくださると助かります。

以上、よろしくお願いします。

fmkt

unread,
Jul 18, 2008, 6:18:47 AM7/18/08
to Redmine Users (japanese)
こんばんわ。

詳しく調べていませんが。
distance_of_time_in_words メソッドでglocを利用して日本語化された
メッセージを表示しようとしたけど、デフォルトの何かがないとかなんとか。

なので、lang/ja.yml はちゃんと更新されているでしょうか?
以下のような定義がファイルに記述されているかの確認お願いします。

_gloc_rule_default: '|n| n==1 ? "" : "_plural" '
...
actionview_datehelper_time_in_words_day_plural: %d日


あと、必要があるのかわかりませんが、
rake rails:update
の、実行とか...

では。

kirara397

unread,
Jul 21, 2008, 11:17:35 PM7/21/08
to Redmine Users (japanese)
fmktさん、ありがとうございます。

結論を先に申し上げると、問題は解決しました。

> distance_of_time_in_words メソッドでglocを利用して日本語化された
> メッセージを表示しようとしたけど、デフォルトの何かがないとかなんとか。
>
> なので、lang/ja.yml はちゃんと更新されているでしょうか?
> 以下のような定義がファイルに記述されているかの確認お願いします。
>
> _gloc_rule_default: '|n| n==1 ? "" : "_plural" '
> ...
> actionview_datehelper_time_in_words_day_plural: %d日

それらの定義は記述されていましたが、ya.ymlの文字コードがUTF-8 (BOM付き) になっていたため、
正しく認識されていなかったようです。
UTF-8 (BOM無し) でya.ymlを保存してRedmineを再起動したところ、正常動作に戻りました。
以前ya.ymlをカスタマイズした際に、文字コードを変更してしまっていたようです。

fmktさんの指摘がなければ、ya.ymlを疑うことができませんでした。
ありがとうございました。

kirara397

unread,
Jul 21, 2008, 11:20:07 PM7/21/08
to Redmine Users (japanese)
訂正です。
先ほどの投稿は

誤)ya.yml
正)ja.yml

です。失礼しました。
Reply all
Reply to author
Forward
0 new messages