Defect #7150
closed
NoMethodError - Update 0.8 to 1.0
Description
I've upgraded redmine from 0.8 to 1.0.. But I've problems to run the new version.. I've also done the migrations AND the migrations for plugins..
The commands were:
vs2052239:~/docs$ rake db:migrate:upgrade_plugin_migrations RAILS_ENV=production vs2052239:~/docs$ rake db:migrate_plugins RAILS_ENV=production
The error-message on Welcome-Screen is:
Showing app/views/layouts/base.rhtml where line #41 raised:
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.<=>
Extracted source (around line #41):
38: <%= link_to l(:label_search), {:controller => 'search', :action => 'index', :id => @project}, :accesskey => accesskey(:search) %>:
39: <%= text_field_tag 'q', @question, :size => 20, :class => 'small', :accesskey => accesskey(:quick_search) %>
40: <% end %>
41: <%= render_project_jump_box %>
42: </div>
43:
44: <h1><%= page_header_title %></h1>
RAILS_ROOT: /var/www/projects/redmine-1.0
My enviroment is:
vs2052239:~/docs$ RAILS_ENV="production" script/about Ruby version 1.8.7 (i486-linux) RubyGems version 1.3.6 Rack version 1.0 Rails version 2.3.5 Active Record version 2.3.5 Active Resource version 2.3.5 Action Mailer version 2.3.5 Active Support version 2.3.5 Application root /var/www/...../redmine-1.0 Environment production Database adapter mysql Database schema version 101
Thanks for any help..
Updated by Anonymous about 15 years ago
Update the information "Full Trace"
/var/www/projects/redmine-1.0/app/helpers/application_helper.rb:243:in `sort_by' /var/www/projects/redmine-1.0/app/helpers/application_helper.rb:243:in `project_tree' /var/www/projects/redmine-1.0/app/helpers/application_helper.rb:226:in `project_tree_options_for_select' /var/www/projects/redmine-1.0/app/helpers/application_helper.rb:216:in `render_project_jump_box' /var/www/projects/redmine-1.0/app/views/layouts/base.rhtml:41:in `_run_rhtml_app47views47layouts47base46rhtml' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_view/renderable.rb:34:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_view/renderable.rb:34:in `render' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_view/base.rb:306:in `with_template' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_view/renderable.rb:30:in `render' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_view/template.rb:205:in `render_template' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_view/base.rb:265:in `render' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_view/base.rb:352:in `_render_with_layout' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_view/base.rb:262:in `render' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:1250:in `render_for_file' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:945:in `render_without_benchmark' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/benchmarking.rb:51:in `render' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb:17:in `ms'
Updated by Mischa The Evil about 15 years ago
Which plugins do you have installed?
Updated by Anonymous about 15 years ago
Mh, I've had timesheet-plugin installed, but in the new version I have no plugins installed.. Should I install timesheet to avoid nil-pointer?
thx,
tom
Updated by Jean-Philippe Lang about 15 years ago
It looks like some database fields where not properly initialized during migration.
Can you attach the result of the following query:
SELECT id, parent_id, lft, rgt FROM projects;
Updated by Anonymous about 15 years ago
sure..fyi, the projects all have no subprojects...
1 NULL 3 4 2 NULL 1 2 3 NULL 11 12 4 NULL 7 8 5 NULL 5 6 6 NULL 19 20 7 NULL 9 10 8 NULL 13 14 9 NULL 17 18 10 NULL 15 16
Updated by Anonymous about 15 years ago
Update: I've noticed an real mysql-error.. in calling http://myredmine/projects/projectname ..
Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND projects.rgt < ))) AND issue_statuses.is_closed=0) AND (projects.status=1 AN' at line 1: SELECT count(DISTINCT `issues`.id) AS count_all, tracker_id AS tracker_id FROM `issues` LEFT OUTER JOIN `projects` ON `projects`.id = `issues`.project_id LEFT OUTER JOIN `issue_statuses` ON `issue_statuses`.id = `issues`.status_id LEFT OUTER JOIN `trackers` ON `trackers`.id = `issues`.tracker_id WHERE (((projects.id = 2 OR (projects.lft > AND projects.rgt < ))) AND issue_statuses.is_closed=0) AND (projects.status=1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) GROUP BY tracker_id
It seems, that the default-value for projects.lft an projects.rgt is not working..
Thanks for your help..
Tom
Updated by Anonymous about 15 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
I've done a complete new migration with restored database and newest version (svn update) of redmine. and it works..
Updated by Jean-Philippe Lang about 15 years ago
- Status changed from Resolved to Closed
- Resolution set to Invalid
Your project table was looking ok. Anyway, thanks for the feedback.