Defect #2177
closedredMine 500 error
0%
Description
redMine 500 error
Internal error
An error occurred on the page you were trying to access.
If you continue to experience problems please contact your redMine administrator for assistance.
An error occurred on the page you were trying to access. If you continue to experience problems please contact your redMine administrator for assistance ActionView::TemplateError (undefined method `length' for #<Enumerable::Enumerator:0xb72a7e54>) on line #22 of repositories/_dir_list_content.rhtml: 19: <td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td> 20: <td class="author"><%=h(entry.lastrev.author.to_s.split('<').first) if entry.lastrev %></td> 21: <% changeset = @project.repository.changesets.find_by_revision(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %> 22: <td class="comments"><%=h truncate(changeset.comments, 50) unless changeset.nil? %></td> 23: </tr> 24: <% end %> vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb:50:in `truncate' app/views/repositories/_dir_list_content.rhtml:22:in `_run_erb_47app47views47repositories47_dir_list_content46rhtml' app/views/repositories/_dir_list_content.rhtml:1:in `each' app/views/repositories/_dir_list_content.rhtml:1:in `_run_erb_47app47views47repositories47_dir_list_content46rhtml' 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_view/base.rb:331:in `render' vendor/rails/actionpack/lib/action_view/partials.rb:120:in `render_partial' vendor/rails/actionpack/lib/action_view/base.rb:352:in `render' app/views/repositories/_dir_list.rhtml:13:in `_run_erb_47app47views47repositories47_dir_list46rhtml' 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_view/base.rb:331:in `render' vendor/rails/actionpack/lib/action_view/partials.rb:120:in `render_partial' vendor/rails/actionpack/lib/action_view/base.rb:352:in `render' app/views/repositories/show.rhtml:9:in `_run_erb_47app47views47repositories47show46rhtml' 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/ruby/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/ruby/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/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/local/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/local/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/local/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start' /usr/local/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/local/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start' /usr/local/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each' /usr/local/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start' /usr/local/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start' /usr/local/ruby/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/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/local/ruby/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 /usr/local/redmine/public/500.html (500 Internal Server Error)
Related issues
Updated by Jean-Philippe Lang about 16 years ago
Please, give at least your Redmine, ruby and ruby on rails versions as requested in SubmittingBugs.
Updated by Jean-Baptiste Crouigneau about 16 years ago
Hello,
Same issue on Activity page.
I installed last version of redmine (0.7.3) with following config :
- DB : mysql 5.0.67
- Ruby 1.8.7
- Rails 2.0.2
I created a new project, a new type of issue (Task), added a Task to the project.
Then Activity page display 500.html message.
Log file shows the same messages than hereunder (TemplateError) on line #11 of projects/activity.rhtml.
Updated by Jean-Philippe Lang about 16 years ago
Redmine 0.7.3 and Rails 2.0.2 are not compatible with ruby 1.8.7 (see: http://rubyonrails.org/down).
Updated by Ramesh Nair about 16 years ago
I am seeing this too. My setup is:
DB: mysql 5.0.51a
Ruby 1.8.7
Rails 2.2.2
I found a fix on http://blog.sviluppoweb.eu/2008/11/26/undefined-method-length-for-enumerableenumerator-on-text_helperrb50in-truncate/
Basically, add the following to redmine/config/environment.fb (near end-of-file):
module ActionView module Helpers module TextHelper def truncate(text, length = 30, truncate_string = "...") if text.nil? then return end l = length - truncate_string.chars.to_a.size (text.chars.to_a.size > length ? text.chars.to_a[0...l].join + truncate_string : text).to_s end end end end
This got it working for me.
Updated by Ramesh Nair about 16 years ago
Ram Bo wrote:
Basically, add the following to redmine/config/environment.fb (near end-of-file):
Oops, meant to say environment.rb
Updated by Jean-Philippe Lang almost 16 years ago
- Status changed from New to Closed
- Resolution set to Invalid
See Redmine requirements in the install guide.
Updated by ron nor almost 16 years ago
Thats solution worked for me too. I added the snipplet above directly under the other ActionView-Stuff near end of file.
Ronny
Updated by Andrea Zilio over 14 years ago
ron nor wrote:
Thats solution worked for me too. I added the snipplet above directly under the other ActionView-Stuff near end of file.
Ronny
Can you please specify where you exactly added that snippet? I'm not able to get it working.
Updated by Etienne Massip over 11 years ago
- Related to Defect #14549: i do not know if it is a bug added