Defect #1498
closedRepository Browsing in 0.7.2 Doesn't Work (Debian 5, Ruby 1.8)
0%
Description
Whenever I try to browse a Subversion repository, by either http:// or file:///, the page throws a 500 error, and the log file gives me this:
ActionView::TemplateError (undefined method `length' for #<Enumerable::Enumerator
:0xb7221714>) on line #22 of repositories/_dir_list_content.rhtml:
19: <td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) i
f 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.n
il? %></td>
23: </tr>
24: <% end %>
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/helpers/text_helper.r
b:50:in `truncate'
app/views/repositories/_dir_list_content.rhtml:22:in `_run_erb_47app47views47
repositories47_dir_list_content46rhtml'
app/views/repositories/_dir_list_content.rhtml:1:in `each'
app/views/repositories/_dir_list_content.rhtml:1:in `_run_erb_47app47views47r
epositories47_dir_list_content46rhtml'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:637:in `send'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:637:in `compi
le_and_render_template'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:365:in `rende
r_template'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:316:in `rende
r_file'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:331:in `rende
r'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/partials.rb:120:in `r
ender_partial'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:352:in `rende
r'
app/views/repositories/_dir_list.rhtml:13:in `_run_erb_47app47views47reposito
ries47_dir_list46rhtml'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:637:in `send'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:637:in `compile_and_render_template'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:365:in `render_template'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:316:in `render_file'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:331:in `render'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/partials.rb:120:in `render_partial'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:352:in `render'
app/views/repositories/show.rhtml:9:in `_run_erb_47app47views47repositories47show46rhtml'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:637:in `send'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:637:in `compile_and_render_template'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:365:in `render_template'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:316:in `render_file'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1100:in `render_for_file'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:836:in `render_with_no_layout'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/layout.rb:262:in `render_without_benchmark'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:51:in `render'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:51:in `render'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1153:in `default_render'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1159:in `perform_action_without_filters'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:697:in `call_filters'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:689:in `perform_action_without_benchmark'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/rescue.rb:199:in `perform_action_without_caching'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:678:in `perform_action'
/var/lib/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
/var/lib/gems/1.8/gems/activerecord-2.0.2/lib/active_record/query_cache.rb:8:in `cache'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:677:in `perform_action'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in `send'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in `process_without_filters'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:685:in `process_without_session_management_support'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session_management.rb:123:in `process'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:388:in `process'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:171:in `handle_request'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:115:in `dispatch'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:9:in `dispatch'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:76:in `process'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in `synchronize'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in `process'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:282:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `each'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
/var/lib/gems/1.8/bin/mongrel_rails:19:in `load'
/var/lib/gems/1.8/bin/mongrel_rails:19
Rendering /opt/redmine/public/500.html (500 Internal Server Error)
I'm no expert, but I don't think it's supposed to do that. The machine is running Debian 5. I tried both http:// and file:/// methods to access the repository. I'm certain that Redmine has sufficient credentials to read the repository.
Updated by Chris Miller over 17 years ago
Also, viewing the activity tab won't work, either. Sorry to be such a bother!
ActionView::TemplateError (undefined method `length' for #<Enumerable::Enumerator
:0xb72becd0>) on line #11 of projects/activity.rhtml:
8: <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.eac
h do |e| -%>
9: <dt class="<%= e.event_type %>"><span class="time"><%= format_time(e.event_d
atetime, false) %></span>
10: <%= content_tag('span', h(e.project), :class => 'project') if @project.nil?
|| @project != e.project %>
11: <%= link_to format_activity_title(e.event_title), e.event_url %></dt>
12: <dd><% unless e.event_description.blank? -%>
13: <span class="description"><%= format_activity_description(e.event_descripti
on) %></span><br />
14: <% end %>
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/helpers/text_helper.r
b:50:in `truncate'
app/helpers/application_helper.rb:95:in `truncate_single_line'
app/helpers/projects_helper.rb:25:in `format_activity_title'
app/views/projects/activity.rhtml:11:in `_run_erb_47app47views47projects47act
ivity46rhtml'
app/views/projects/activity.rhtml:8:in `each'
app/views/projects/activity.rhtml:8:in `_run_erb_47app47views47projects47acti
vity46rhtml'
app/views/projects/activity.rhtml:5:in `each'
app/views/projects/activity.rhtml:5:in `_run_erb_47app47views47projects47acti
vity46rhtml'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:637:in `send'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:637:in `compi
le_and_render_template'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:365:in `rende
r_template'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:316:in `rende
r_file'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1100:in
`render_for_file'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:836:in
`render_with_no_layout'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/layout.rb:262:i
n `render_without_benchmark'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb
:51:in `render'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:51:in `render'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1153:in `default_render'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1159:in `perform_action_without_filters'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:697:in `call_filters'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:689:in `perform_action_without_benchmark'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/rescue.rb:199:in `perform_action_without_caching'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:678:in `perform_action'
/var/lib/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
/var/lib/gems/1.8/gems/activerecord-2.0.2/lib/active_record/query_cache.rb:8:in `cache'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:677:in `perform_action'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in `send'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in `process_without_filters'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:685:in `process_without_session_management_support'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session_management.rb:123:in `process'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:388:in `process'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:171:in `handle_request'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:115:in `dispatch'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:9:in `dispatch'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:76:in `process'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in `synchronize'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in `process'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:282:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `each'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
/var/lib/gems/1.8/bin/mongrel_rails:19:in `load'
/var/lib/gems/1.8/bin/mongrel_rails:19
Rendering /opt/redmine/public/500.html (500 Internal Server Error)
Updated by Eric Davis over 17 years ago
Is this related to #1457 or this thread ? If so it looks like the cause is Ruby 1.8.7.
Updated by Chris Miller over 17 years ago
Well, it is Ruby 1.8.7. However, I have no means of downgrading to Ruby 1.8.6. Are there plans to migrate to Ruby 1.8.7? I would hope so, because right now it's going to bite every user of Debian Lenny.
Updated by Thomas Lecavelier over 17 years ago
- Target version deleted (
0.7.2)
See the forum link for a ruby patch solving the problem.
Updated by Jean-Philippe Lang over 17 years ago
- Status changed from New to Resolved
Actually, it's a Rails patch.
Updated by Jean-Philippe Lang over 17 years ago
- Status changed from Resolved to Closed
- Target version set to 0.8
- Resolution set to Fixed
Current trunk is compatible with Rails 2.1 + ruby 1.8.7.