Project

General

Profile

Redmine gives "Internal error" when trying to "View" any text file in Subversion

Added by Paul Bilokon almost 14 years ago

Dear all,

I'm using Subversion (SVN) over RedMine. When I browse a repository for a project and click on "View" for a text file (e.g. Something.java) I get the following:

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.

Back

No further information is provided. If you need me to give you more detail, please let me know where to find it.

Do you know how I can debug and fix this error?

Many thanks in advance,
Paul


Replies (6)

RE: Redmine gives "Internal error" when trying to "View" any text file in Subversion - Added by Felix Schäfer almost 14 years ago

Have a look at the redmine log in redmine_dir/log/production.log.

RE: Redmine gives "Internal error" when trying to "View" any text file in Subversion - Added by Paul Bilokon almost 14 years ago

Here is what I see in production.log:

Processing RepositoriesController#entry (for 86.145.182.153 at 2010-06-15 03:26:55) [GET]
  Parameters: {"controller"=>"repositories", "action"=>"entry", "id"=>"thales-j-commons", "path"=>["src", "main", "java", "com", "thalesians", "thales", "jcommons", "Main.java"]}
Rendering template within layouts/base
Rendering repositories/entry

ActionView::TemplateError (wrong number of arguments (1 for 2)) on line #5 of app/views/common/_file.rhtml:
2: <table class="filecontent CodeRay">
3: <tbody>
4: <% line_num = 1 %>
5: <% syntax_highlight(filename, to_utf8(content)).each_line do |line| %>
6: <tr><th class="line-num" id="L<%= line_num %>"><a href="#L<%= line_num %>"><%= line_num %></a></th><td class="line-code"><pre><%= line %></pre></td></tr>
7: <% line_num += 1 %>
8: <% end %>

    app/helpers/application_helper.rb:283:in `syntax_highlight'
    app/views/common/_file.rhtml:5:in `_run_rhtml_app47views47common47_file46rhtml_locals_content_file_filename_object'
    app/views/repositories/entry.rhtml:11:in `_run_rhtml_app47views47repositories47entry46rhtml'
    <internal:prelude>:8:in `synchronize'
    passenger (2.2.14) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
    passenger (2.2.14) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
    passenger (2.2.14) lib/phusion_passenger/railz/application_spawner.rb:441:in `start_request_handler'
    passenger (2.2.14) lib/phusion_passenger/railz/application_spawner.rb:381:in `block in handle_spawn_application'
    passenger (2.2.14) lib/phusion_passenger/utils.rb:252:in `safe_fork'
    passenger (2.2.14) lib/phusion_passenger/railz/application_spawner.rb:377:in `handle_spawn_application'
    passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
    passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
    passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:163:in `start'
    passenger (2.2.14) lib/phusion_passenger/railz/application_spawner.rb:222:in `start'
    passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:262:in `block (2 levels) in spawn_rails_application'
    passenger (2.2.14) lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
    passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:256:in `block in spawn_rails_application'
    passenger (2.2.14) lib/phusion_passenger/abstract_server_collection.rb:80:in `block in synchronize'
    <internal:prelude>:8:in `synchronize'
    passenger (2.2.14) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
    passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
    passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
    passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
    passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'

Rendering /www/html/www.thalesians.com/projects/public/500.html (500 Internal Server Error)

Do you have any idea why this might be happening? This is the latest stable release of Redmine.

Best wishes,
Paul

RE: Redmine gives "Internal error" when trying to "View" any text file in Subversion - Added by Paul Bilokon almost 14 years ago

By the way,

  1. rails -v
    Rails 2.3.8
  2. ruby -v
    ruby 1.9.1p378 (2010-01-10 revision 26273) [x86_64-linux]

RE: Redmine gives "Internal error" when trying to "View" any text file in Subversion - Added by Felix Schäfer almost 14 years ago

Paul Bilokon wrote:

By the way,

  1. rails -v
    Rails 2.3.8
  2. ruby -v
    ruby 1.9.1p378 (2010-01-10 revision 26273) [x86_64-linux]

There you have it. I'll let you figure it out by yourself :-)

RE: Redmine gives "Internal error" when trying to "View" any text file in Subversion - Added by Paul Bilokon almost 14 years ago

Actually everything else, apart from this syntax highlighter seems to work perfectly, and some of my other applications rely on ruby 1.9. I would rather avoid downgrading ruby. This seems to be the only problem so far.

Do you have any idea why this thing thinks that

<% syntax_highlight(filename, to_utf8(content)).each_line do |line| %>

takes one argument while it's perfectly clear that it's being passed two? I am not an expert on ruby, at least at this stage, so would be very much obliged if you could explain?

Many thanks,
Paul

RE: Redmine gives "Internal error" when trying to "View" any text file in Subversion - Added by Felix Schäfer almost 14 years ago

Ruby 1.9 is just not supported, there are lots of changes, especially wrt string handling (sorry, I had written some more detail, but my browser decided to throw it away...).

Anyway, downgrading can be avoided by installing concurrent ruby versions, see e.g. rvm.

    (1-6/6)