Project

General

Profile

Various "Internal error" after upgrading from 0.7.1 to 0.7.2

Added by Dennis K over 16 years ago

I upgraded from r1477 to r1555 and recieve "Internal Errors" on following Modules:
Activity, Forums, Project Archive.

I use mysql and svn as backend on a debian lenny machine.

Any hints?

Greetings,
slazZ


Replies (10)

RE: Various "Internal error" after upgrading from 0.7.1 to 0.7.2 - Added by Dennis K over 16 years ago

I consult the logfile:

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

RE: Various "Internal error" after upgrading from 0.7.1 to 0.7.2 - Added by Gwenael Pellen over 16 years ago

Hi,

can you change truncate function by this in vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb
this code is the truncate function on rails 1.1.6 debian package source.

def truncate(text, length = 30, truncate_string = "...")
        if text.nil? then return end
        l = length - truncate_string.length
        if $KCODE == "NONE" 
          text.length > length ? text[0...l] + truncate_string : text
        else
          chars = text.split(//)
          chars.length > length ? chars[0...l].join + truncate_string : text
        end
      end

best regards.
---
Gwenael Pellen

RE: Various "Internal error" after upgrading from 0.7.1 to 0.7.2 - Added by Thomas Lecavelier over 16 years ago

Have you check that you haven't files in conflict in your svn tree?
Which version of rails is frozen in your redmine?
The better should be to display the result of:

$ ruby script/about

RE: Various "Internal error" after upgrading from 0.7.1 to 0.7.2 - Added by Dennis K over 16 years ago

Thanks to both of you for your replies :)

@Gwenael Pellen:
Your code snippet makes redmine working again, thanks!

Thomas Eccard Lecavelier:
Everything alright with the files, no conflicts.
For "ruby script/about" I had to create a development-database configuration. Here's the output:

$ ruby script/about 
About your application's environment
Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.1.1
Rails version             2.0.2
Active Record version     2.0.2
Action Pack version       2.0.2
Active Resource version   2.0.2
Action Mailer version     2.0.2
Active Support version    2.0.2
Edge Rails revision       rel_2-0-2
Application root          /var/www/redmine
Environment               development
Database adapter          mysql
Database schema version   92

To clear thinks up:
For the "undefined method 'length'" failure ruby 1.8.7 is to blame. I completly overlooked the upgrade of ruby from 1.8.6 to 1.8.7 on my system..
But with Gwenael Pellen's solution, redmine now works even with ruby 1.8.7! :)

Also see #1457

RE: Various "Internal error" after upgrading from 0.7.1 to 0.7.2 - Added by Thomas Lecavelier over 16 years ago

FYI, you can use the RAILS_ENV env variable to see your production config:

$ ruby script/about RAILS_ENV=production

RE: Various "Internal error" after upgrading from 0.7.1 to 0.7.2 - Added by Dennis K over 16 years ago

Unfortunately not :/

ruby script/about RAILS_ENV=production
/var/www/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:217:in `establish_connection': development database is not configured (ActiveRecord::AdapterNotSpecified)

RE: Various "Internal error" after upgrading from 0.7.1 to 0.7.2 - Added by Jason Fournier over 16 years ago

I'm trying to install Redmine (to be honest, this is my first rails app ever) and I'm getting Internal Server Errors as well. Any help would be AWESOME. I've searched the forums and found other errors, but nothing that seems to change my case.

Here's my info:

ruby script/about:
About your application's environment
Ruby version 1.8.7 (i686-linux)
RubyGems version 1.1.1
Rails version 2.0.2
Active Record version 2.0.2
Action Pack version 2.0.2
Active Resource version 2.0.2
Action Mailer version 2.0.2
Active Support version 2.0.2
Application root /var/www/redmine
Environment development
Database adapter mysql
Database schema version 92

And the log:
Logfile created on Tue Jun 17 19:03:33 +0000 2008/!\ FAILSAFE /!\ Tue Jun 17 19:04:43 +0000 2008
Status: 500 Internal Server Error
wrong number of arguments (2 for 1)
/usr/lib/ruby/1.8/cgi/session.rb:267:in `respond_to?'
/usr/lib/ruby/1.8/cgi/session.rb:267:in `initialize_without_cgi_reader'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/cgi_ext/session.rb:39:in `initialize'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/cgi_process.rb:130:in `new'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/cgi_process.rb:130:in `session'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/cgi_process.rb:166:in `stale_session_check!'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/cgi_process.rb:114:in `session'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1131:in `assign_shortcuts_without_flash'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/flash.rb:167:in `assign_shortcuts'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:518:in `process_without_filters'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:685:in `process_without_session_management_support'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session_management.rb:123:in `process'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:388:in `process'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:171:in `handle_request'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:115:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:9:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:112:in `handle_dispatch'
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:78:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:62:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/webrick.rb:66
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
script/server:3

RE: Various "Internal error" after upgrading from 0.7.1 to 0.7.2 - Added by Thomas Lecavelier over 16 years ago

Next time, please open a new thread.

Start by trying with mongrel:

sudo gem install mongrel

It's transparent for you (you can run ruby script/server without any change) and could work better.

RE: Various "Internal error" after upgrading from 0.7.1 to 0.7.2 - Added by Jason Fournier over 16 years ago

I installed mongrel and I'm having the same issues. I've started a new thread here:
http://www.redmine.org/boards/2/topics/show/1381

Thanks for the help Thomas, previously and any additional advice you might have.

I need an advice - Added by mulkinualuavy mulkinualuavy over 15 years ago

<spam removed by Mischa The Evil on 26-10-2011 22:43>

    (1-10/10)