Project

General

Profile

Actions

Defect #1457

closed

Undefined method "length"

Added by Dennis K over 16 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
-
Target version:
-
Start date:
2008-06-16
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Actions #1

Updated by Jean-Philippe Lang over 16 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

Please read SubmittingBugs and provide the required information.

Actions #2

Updated by Dennis K over 16 years ago

  • Status changed from Closed to Reopened

Recieve an "Internal error" after upgrading from 0.7.1 (r1477) to 0.7.2 (r1555) on the pages Activity, Forums and Project Archive.

  • MySQL 5.0.51a-6 (Debian)
  • ruby 1.8.7 (2008-05-31 patchlevel 0) [x86_64-linux]
  • rails 2.0.2
  • redmine 0.7.2, r1555
  • svn 1.4.6 (r28521)

And the stacktrace when I clicked e.g. on "Forums" :

ActionView::TemplateError (undefined method `length' for #<Enumerable::Enumerator:0x2b2e829655b0>) on line #49 of boards/show.rhtml:
46:       <td class="last_message">
47:         <% if topic.last_reply %>
48:         <%= authoring topic.last_reply.created_on, topic.last_reply.author %><br />
49:         <%= link_to_message topic.last_reply %>
50:         <% end %>
51:       </td>
52:     </tr>

    vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb:50:in `truncate'
    app/helpers/messages_helper.rb:22:in `link_to_message'
    app/views/boards/show.rhtml:49:in `_run_erb_47app47views47boards47show46rhtml'
    app/views/boards/show.rhtml:40:in `each'
    app/views/boards/show.rhtml:40:in `_run_erb_47app47views47boards47show46rhtml'
    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:858:in `render_with_no_layout'
    vendor/rails/actionpack/lib/action_controller/base.rb:872: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/lib/ruby/1.8/benchmark.rb:293:in `measure'
    vendor/rails/actionpack/lib/action_controller/benchmarking.rb:51:in `render'
    app/controllers/boards_controller.rb:48:in `show'
    app/controllers/boards_controller.rb:34:in `index'
    vendor/rails/actionpack/lib/action_controller/base.rb:1158:in `send'
    vendor/rails/actionpack/lib/action_controller/base.rb:1158: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/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/fcgi_handler.rb:101:in `process_request'
    vendor/rails/railties/lib/fcgi_handler.rb:149:in `with_signal_handler'
    vendor/rails/railties/lib/fcgi_handler.rb:99:in `process_request'
    vendor/rails/railties/lib/fcgi_handler.rb:77:in `process_each_request'
    /usr/lib/ruby/1.8/fcgi.rb:612:in `each_cgi'
    /usr/lib/ruby/1.8/fcgi.rb:609:in `each'
    /usr/lib/ruby/1.8/fcgi.rb:609:in `each_cgi'
    vendor/rails/railties/lib/fcgi_handler.rb:76:in `process_each_request'
    vendor/rails/railties/lib/fcgi_handler.rb:50:in `process!'
    vendor/rails/railties/lib/fcgi_handler.rb:24:in `process!'
    public/dispatch.fcgi:24
Actions #3

Updated by Jean-Philippe Lang over 16 years ago

http://rubyonrails.org/down says that there are some compatibility issues with ruby 1.8.7.
Did you upgrade ruby when upgrading to Redmine 0.7.2 ?

Actions #4

Updated by Dennis K over 16 years ago

You are totally right, I missed that point completly. Seems that I forgot to test redmine after upgrading rails..
With "ruby 1.8.6 (2008-03-03 patchlevel 114) [x86_64-linux]" redmine works flawless :)

Anyway, thanks for taken the time!
Now I'm going to try out the suggestions in the forums-thread.

Actions #5

Updated by Dennis K over 16 years ago

In the forums thread Gwenael Pellen posts a code snippet that makes redmine work again also with ruby 1.8.7

Actions #6

Updated by Jean-Philippe Lang over 16 years ago

  • Status changed from Reopened to Closed
  • Affected version (unused) deleted (devel)

OK, I close this ticket since it's not a Redmine issue. I've just added a note about this in RedmineInstall.
Thanks for the feedback.

Actions

Also available in: Atom PDF