Project

General

Profile

Error 500 after upgrading to 1.1.0

Added by Anonymous almost 14 years ago

I just finished upgrading from 1.0.4 to 1.1.0 on Ubuntu. I followed the update steps on the wiki and remembered to migrate the DB (no errors at this step).

When I try to access any project the request fails (500) and the following is posted to the production.log:

ActionView::TemplateError (undefined method `visible_custom_field_values' for #<Project:0x7f20a6bda448>) on 
line #19 of app/views/projects/show.rhtml:
16:     <li><%=l(:label_subproject_plural)%>:
17:         <%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ") %></li>
18:   <% end %>
19:     <% @project.visible_custom_field_values.each do |custom_value| %>
20:     <% if !custom_value.value.blank? %>
21:        <li><%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
22:     <% end %>

    app/views/projects/show.rhtml:19:in `_run_rhtml_app47views47projects47show46rhtml'
    app/controllers/projects_controller.rb:166:in `show'
    /usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92:in `process_request'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
    /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
    /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
    /usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
    /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
    /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:213:in `start'
    /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
    /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
    /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
    /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
    /usr/lib/phusion_passenger/passenger-spawn-server:61

Any ideas?


Replies (8)

RE: Error 500 after upgrading to 1.1.0 - Added by Anonymous almost 14 years ago

At first glance this only seems to affect the Overview page... if I type in a link to an issue or the wiki those pages load fine

RE: Error 500 after upgrading to 1.1.0 - Added by Omar Abdel-Wahab almost 14 years ago

We have exactly the same error upgrading from 1.0.2 to 1.1.0.

RE: Error 500 after upgrading to 1.1.0 - Added by Artem La almost 14 years ago

Getting same stacktrace as reporter's. But also I'm getting almost same issue when viewing a user info page from project page.

Processing UsersController#show (for 192.168.1.50 at 2011-01-11 12:27:26) [GET]
  Parameters: {"action"=>"show", "id"=>"44", "controller"=>"users"}
Rendering template within layouts/base
Rendering users/show

ActionView::TemplateError (undefined method `visible_custom_field_values' for #<User:0xb685e290>) on line #12 of app/views/users/show.rhtml:
9:      <% unless @user.pref.hide_mail %>
10:             <li><%=l(:field_mail)%>: <%= mail_to(h(@user.mail), nil, :encode => 'javascript') %></li>
11:     <% end %>
12:     <% @user.visible_custom_field_values.each do |custom_value| %>
13:     <% if !custom_value.value.blank? %>
14:     <li><%=h custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
15:     <% end %>

    app/views/users/show.rhtml:12:in `_run_rhtml_app47views47users47show46rhtml'
    app/controllers/users_controller.rb:79:in `show'
    app/controllers/users_controller.rb:78:in `show'
    /var/www/redmine/public/dispatch.fcgi:24

Rendering /var/www/redmine-1.1.0/public/500.html (500 Internal Server Error)
<pre>

RE: Error 500 after upgrading to 1.1.0 - Added by Tristan Knight almost 14 years ago

Experiencing the same issue upgrading from 1.0.5 to 1.1.0 on Debian

ActionView::TemplateError (undefined method `visible_custom_field_values' for #<Project:0xb51e6530>) on line #19 of app/views/projects/show.rhtml:
16:     <li><%=l(:label_subproject_plural)%>:
17:         <%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ") %></li>
18:   <% end %>
19:     <% @project.visible_custom_field_values.each do |custom_value| %>
20:     <% if !custom_value.value.blank? %>
21:        <li><%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
22:     <% end %>

    app/views/projects/show.rhtml:19:in `_run_rhtml_app47views47projects47show46rhtml'
    app/controllers/projects_controller.rb:166:in `show'
    /var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/rack/request_handler.rb:95:in `process_request'
    /var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
    /var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/railz/application_spawner.rb:378:in `start_request_handler'
    /var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/railz/application_spawner.rb:336:in `handle_spawn_application'
    /var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/utils.rb:185:in `safe_fork'
    /var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/railz/application_spawner.rb:334:in `handle_spawn_application'
    /var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/abstract_server.rb:352:in `__send__'
    /var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
    /var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
    /var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/abstract_server.rb:163:in `start'
    /var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/railz/application_spawner.rb:213:in `start'
    /var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
    /var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
    /var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
    /var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
    /var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    /var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
    /var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
    /var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
    /var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/abstract_server.rb:352:in `__send__'
    /var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
    /var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'

Rendering /home/redmine/redmine-1.1/public/500.html (500 Internal Server Error)

RE: Error 500 after upgrading to 1.1.0 - Added by Vasili Pupkin almost 14 years ago

I have exactly the same problem with the installation on Ubuntu from 1.0.4 to the 1.1.0.
I tried both upgrade options - from svn sources and from tarball.

RE: Error 500 after upgrading to 1.1.0 - Added by Anonymous almost 14 years ago

Since this is not just me (yay), I've opened defect #7297 for the issue.

RE: Error 500 after upgrading to 1.1.0 - Added by Ilya Kharmatsky almost 14 years ago

See comment and patch in the #7297 - it resolved the same problem for me

RE: Error 500 after upgrading to 1.1.0 - Added by Anonymous almost 14 years ago

Thanks Ilya! The patch works fine.

    (1-8/8)