Project

General

Profile

Actions

Defect #3363

closed

Current trunk broke redmine

Added by Nelson LaQuet over 15 years ago. Updated over 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-05-15
Due date:
% Done:

100%

Estimated time:
Resolution:
Affected version:

Description

I have a redmine instance that I use to test the latest code. I have a script that dumps my main remdine instance, loads it into the second redmine instance, runs svn update, sets the encryption key thing in the newer version, and migrates the database.

Yesterday, I did an update and it broke. I tried restarting apache, but get the same problem. It asks me to log in, and once I login I get a redmine 500 error. Here is what I found in production.log:

Processing WelcomeController#index (for 173.10.110.105 at 2009-05-14 17:32:30) [GET]
Parameters: {"action"=>"index", "controller"=>"welcome"}
Rendering template within layouts/base
Rendering welcome/index

ActionView::TemplateError (comparison of Fixnum with nil failed) on line #37 of app/views/layouts/base.rhtml:
34:         <%= link_to l(:label_search), {:controller => 'search', :action => 'index', :id => @project}, :accesskey => accesskey(:search) %>:
35:         <%= text_field_tag 'q', @question, :size => 20, :class => 'small', :accesskey => accesskey(:quick_search) %>
36:         <% end %>
37:         <%= render_project_jump_box %>
38:     </div>
39:
40:     <h1><%= page_header_title %></h1>

    app/helpers/application_helper.rb:161:in `sort_by'
    app/helpers/application_helper.rb:161:in `project_tree'
    app/helpers/application_helper.rb:149:in `project_tree_options_for_select'
    app/helpers/application_helper.rb:139:in `render_project_jump_box'
    app/views/layouts/base.rhtml:37
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in `send'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in `render'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/template.rb:73:in `render_template'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb:256:in `render'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb:371:in `_render_with_layout'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb:254:in `render'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1174:in `render_for_file'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:896:in `render_without_benchmark'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in `render'
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb:8:in `realtime'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in `render'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:868:in `render_without_benchmark'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in `render'
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb:8:in `realtime'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in `render'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1248:in `default_render'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1254:in `perform_action_without_filters'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in `call_filters'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:638:in `run_before_filters'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:189:in `call'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:189:in `call'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:635:in `run_before_filters'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:615:in `call_filters'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
    /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in `perform_action_without_caching'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in `passenger_orig_perform_action'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in `cache'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in `passenger_orig_perform_action'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in `cache'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in `passenger_orig_perform_action'
    /usr/local/lib/passenger/lib/phusion_passenger/railz/request_handler.rb:53:in `perform_action'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in `send'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in `process_without_filters'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in `process_without_session_management_support'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in `process'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in `process'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in `handle_request'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in `dispatch_unlocked'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:123:in `dispatch'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in `synchronize'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in `dispatch'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in `dispatch_cgi'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in `dispatch'
    /usr/local/lib/passenger/lib/phusion_passenger/railz/request_handler.rb:38:in `process_request'
    /usr/local/lib/passenger/lib/phusion_passenger/abstract_request_handler.rb:197:in `main_loop'
    /usr/local/lib/passenger/lib/phusion_passenger/railz/application_spawner.rb:340:in `start_request_handler'
    /usr/local/lib/passenger/lib/phusion_passenger/railz/application_spawner.rb:298:in `handle_spawn_application'
    /usr/local/lib/passenger/lib/phusion_passenger/utils.rb:176:in `safe_fork'
    /usr/local/lib/passenger/lib/phusion_passenger/railz/application_spawner.rb:296:in `handle_spawn_application'
    /usr/local/lib/passenger/lib/phusion_passenger/abstract_server.rb:332:in `__send__'
    /usr/local/lib/passenger/lib/phusion_passenger/abstract_server.rb:332:in `main_loop'
    /usr/local/lib/passenger/lib/phusion_passenger/abstract_server.rb:182:in `start_synchronously'
    /usr/local/lib/passenger/lib/phusion_passenger/abstract_server.rb:149:in `start'
    /usr/local/lib/passenger/lib/phusion_passenger/railz/application_spawner.rb:192:in `start'
    /usr/local/lib/passenger/lib/phusion_passenger/spawn_manager.rb:260:in `spawn_rails_application'
    /usr/local/lib/passenger/lib/phusion_passenger/abstract_server_collection.rb:121:in `lookup_or_add'
    /usr/local/lib/passenger/lib/phusion_passenger/spawn_manager.rb:254:in `spawn_rails_application'
    /usr/local/lib/passenger/lib/phusion_passenger/abstract_server_collection.rb:75:in `synchronize'
    /usr/local/lib/passenger/lib/phusion_passenger/abstract_server_collection.rb:74:in `synchronize'
    /usr/local/lib/passenger/lib/phusion_passenger/spawn_manager.rb:253:in `spawn_rails_application'
    /usr/local/lib/passenger/lib/phusion_passenger/spawn_manager.rb:148:in `spawn_application'
    /usr/local/lib/passenger/lib/phusion_passenger/spawn_manager.rb:285:in `handle_spawn_application'
    /usr/local/lib/passenger/lib/phusion_passenger/abstract_server.rb:332:in `__send__'
    /usr/local/lib/passenger/lib/phusion_passenger/abstract_server.rb:332:in `main_loop'
    /usr/local/lib/passenger/lib/phusion_passenger/abstract_server.rb:182:in `start_synchronously'
    /usr/local/lib/passenger/bin/passenger-spawn-server:50

Rendering /home/cm_redmine2/public_html/public/500.html (500 Internal Server Error)                                                                                         
Actions #1

Updated by Gregor Bader over 15 years ago

We are running redmine r2743 without any problems.

Actions #2

Updated by Jean-Philippe Lang over 15 years ago

Your database doesn't seem to be properly upgraded. You shouldn't have any projects with a NULL value in the 'lft' column.
Can you please run this and see what happens:

ruby script/runner 'Project.rebuild!' -e production
Actions #3

Updated by Nelson LaQuet over 15 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Jean-Philippe Lang wrote:

Your database doesn't seem to be properly upgraded. You shouldn't have any projects with a NULL value in the 'lft' column.
Can you please run this and see what happens:

ruby script/runner 'Project.rebuild!' -e production

Yeah, that fixed it. Any idea on how this might of happend so I can prevent it from happening again?

Actions #4

Updated by Jean-Philippe Lang over 15 years ago

  • Status changed from Resolved to Closed

Well, I don't know how this happened. This should have been done in migration:
source:/trunk/db/migrate/105_build_projects_tree.rb

Actions

Also available in: Atom PDF