【質問】ロールと権限の設定画面で500 Internal Server Error の直し方

2,163 views
Skip to first unread message

ishimaru

unread,
Nov 1, 2008, 4:27:40 AM11/1/08
to Redmine Users (japanese)
はじめまして、こんにちはishimaruと申します。

本日Redmineをインストールしてみたのですが、「管理」→「ロールと権限」の画面から、各ロールの設定画面、及び権限レポートへ遷移しようとする
と、500 Internal Server Error になってしまいます。
ログを見るとテンプレートエラーとあるのですが、どのようにすれば直すことができるのか見当がつきません。
どのようなことが原因で、どのようにすれば直すことができるのか、どなたかアドバイスをいただけないでしょうか。
よろしくお願いいたします。

* 試したこと

rake db:migrate RAILS_ENV=production
ruby script/server -e production

* 環境

・FreeBSD 6.2-RELEASE-p8
・ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-freebsd6]
・RubyGems 1.3.1
・Rails 2.1.2
・MySQL 5.0.45

* 権限レポートへ遷移しようとした際のログ(production.log)

ActionView::TemplateError (can't convert Symbol into String) on line
#26 of roles/report.rhtml:
23: <% @roles.each do |role| %>
24: <td align="center">
25: <% if role.setable_permissions.include? permission %>
26: <%= check_box_tag "permissions[#{role.id}][]",
permission.name, (role.permissions.include? permission.name) %>
27: <% end %>
28: </td>
29: <% end %>

app/views/roles/report.rhtml:26:in `include?'
app/views/roles/report.rhtml:26:in
`_run_erb_47app47views47roles47report46rhtml'
app/views/roles/report.rhtml:23:in `each'
app/views/roles/report.rhtml:23:in
`_run_erb_47app47views47roles47report46rhtml'
app/views/roles/report.rhtml:20:in `each'
app/views/roles/report.rhtml:20:in
`_run_erb_47app47views47roles47report46rhtml'
app/views/roles/report.rhtml:16:in `each'
app/views/roles/report.rhtml:16:in
`_run_erb_47app47views47roles47report46rhtml'
vendor/rails/actionpack/lib/action_view/helpers/capture_helper.rb:
142:in `call'
vendor/rails/actionpack/lib/action_view/helpers/capture_helper.rb:
142:in `capture_erb_with_buffer'
vendor/rails/actionpack/lib/action_view/helpers/capture_helper.rb:
44:in `capture'
vendor/rails/actionpack/lib/action_view/helpers/form_tag_helper.rb:
417:in `form_tag_in_block'
vendor/rails/actionpack/lib/action_view/helpers/form_tag_helper.rb:
39:in `form_tag'
app/views/roles/report.rhtml:3:in
`_run_erb_47app47views47roles47report46rhtml'
vendor/rails/actionpack/lib/action_view/base.rb:637:in `send'
vendor/rails/actionpack/lib/action_view/base.rb:637:in
`compile_and_render_template'
vendor/rails/actionpack/lib/action_view/base.rb:365:in
`render_template'
vendor/rails/actionpack/lib/action_view/base.rb:316:in
`render_file'
vendor/rails/actionpack/lib/action_controller/base.rb:1100:in
`render_for_file'
vendor/rails/actionpack/lib/action_controller/base.rb:836:in
`render_with_no_layout'
vendor/rails/actionpack/lib/action_controller/layout.rb:262:in
`render_without_benchmark'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:
51:in `render'
/usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:
51:in `render'
vendor/rails/actionpack/lib/action_controller/base.rb:1153:in
`default_render'
vendor/rails/actionpack/lib/action_controller/base.rb:1159:in
`perform_action_without_filters'
vendor/rails/actionpack/lib/action_controller/filters.rb:697:in
`call_filters'
vendor/rails/actionpack/lib/action_controller/filters.rb:689:in
`perform_action_without_benchmark'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:
68:in `perform_action_without_rescue'
/usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:
68:in `perform_action_without_rescue'
vendor/rails/actionpack/lib/action_controller/rescue.rb:199:in
`perform_action_without_caching'
vendor/rails/actionpack/lib/action_controller/caching.rb:678:in
`perform_action'
vendor/rails/activerecord/lib/active_record/connection_adapters/
abstract/query_cache.rb:33:in `cache'
vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in
`cache'
vendor/rails/actionpack/lib/action_controller/caching.rb:677:in
`perform_action'
vendor/rails/actionpack/lib/action_controller/base.rb:524:in
`send'
vendor/rails/actionpack/lib/action_controller/base.rb:524:in
`process_without_filters'
vendor/rails/actionpack/lib/action_controller/filters.rb:685:in
`process_without_session_management_support'
vendor/rails/actionpack/lib/action_controller/
session_management.rb:123:in `process'
vendor/rails/actionpack/lib/action_controller/base.rb:388:in
`process'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:171:in
`handle_request'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:115:in
`dispatch'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:126:in
`dispatch_cgi'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:9:in
`dispatch'
vendor/rails/railties/lib/webrick_server.rb:112:in
`handle_dispatch'
vendor/rails/railties/lib/webrick_server.rb:78:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
vendor/rails/railties/lib/webrick_server.rb:62:in `dispatch'
vendor/rails/railties/lib/commands/servers/webrick.rb:66
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
vendor/rails/activesupport/lib/active_support/dependencies.rb:
496:in `require'
vendor/rails/activesupport/lib/active_support/dependencies.rb:
342:in `new_constants_in'
vendor/rails/activesupport/lib/active_support/dependencies.rb:
496:in `require'
vendor/rails/railties/lib/commands/server.rb:39
script/server:3:in `require'
script/server:3

Rendering /home/tickets/redmine-0.7.3/public/500.html (500 Internal
Server Error)

以上

kirara397

unread,
Nov 1, 2008, 7:08:52 AM11/1/08
to Redmine Users (japanese)
ishimaruさん、こんにちは。

500 Internal Server Errorに関しては、過去に2度話題に上っています。
参考になるといいのですが。

・0.7.3 で 500 Internal Server Error
http://groups.google.com/group/redmine-users-ja/browse_thread/thread/ed5d03eb263e9af9
・Internal Server Error (Redmine0.7.3/ CentOS5.2)
http://groups.google.com/group/redmine-users-ja/browse_thread/thread/003f7b8bcc10cfa7/ee3e1c5d4c6395dd?#ee3e1c5d4c6395dd

ishimaru

unread,
Nov 11, 2008, 4:31:01 AM11/11/08
to Redmine Users (japanese)
kirara397さん

アドバイスありがとうございました。
返信遅くなってしまいすみません。

> ・0.7.3 で 500 Internal Server Errorhttp://groups.google.com/group/redmine-users-ja/browse_thread/thread/...
> ・Internal Server Error (Redmine0.7.3/ CentOS5.2)http://groups.google.com/group/redmine-users-ja/browse_thread/thread/...

教えていただいた情報を参考に
・lang/ja.yml の確認
・lang/ja.yml がUTF-8(BOM無し)になっているか確認
・rake rals:updateの実行
・サーバーの再起動
以上を実施してみましたが解決できませんでした。

ちょっと再インストールしてみます。

ishimaru

unread,
Nov 13, 2008, 4:38:51 AM11/13/08
to Redmine Users (japanese)
本件、解決いたしました。

MySQLに作成したデータベースの文字コードが、正しくutf8に設定されていなかったことが原因だったようです。
いったんデータベースを削除し、文字コードをutf8に指定して作成しなおしたところ、エラーが出なくなりました。
(初回はphpmyadminで規定の文字コードがutf8になっていたため、敢えて指定せずに作成しました)

お騒がせいたしました。

----
ishimaru
Reply all
Reply to author
Forward
0 new messages