Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failure at rake db:migrate_plugins #51

Closed
nicolasberens opened this issue Jul 27, 2011 · 5 comments
Closed

failure at rake db:migrate_plugins #51

nicolasberens opened this issue Jul 27, 2011 · 5 comments

Comments

@nicolasberens
Copy link

When i call RAILS_ENV=production rake db:migrate_plugins

I get this error

(in /var/websites/redmine/redmine-1.2)
rake aborted!
undefined method `[]' for nil:NilClass

this only happens when i have the redmine_git_hosting plugin in my plugin dir

with --trace

RAILS_ENV=production rake db:migrate_plugins --trace
(in /var/websites/fengforge/redmine/redmine-1.2)
** Invoke db:migrate_plugins (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
undefined method []' for nil:NilClass /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/routing/builder.rb:159:inbuild'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/routing/route_set.rb:310:in add_route' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/routing/route_set.rb:19:inconnect'
/var/websites/redmine/redmine-1.2/vendor/plugins/redmine_git_hosting/lib/git_hosting.rb:92:in add_route_for_project_with_map' /var/websites/redmine/redmine-1.2/vendor/plugins/redmine_git_hosting/lib/git_hosting.rb:84:inadd_route_for_project'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/routing/route_set.rb:227:in draw' /var/websites/redmine/redmine-1.2/vendor/plugins/redmine_git_hosting/lib/git_hosting.rb:83:inadd_route_for_project'
/var/websites/redmine/redmine-1.2/vendor/plugins/redmine_git_hosting/config/routes.rb:3
/var/websites/redmine/redmine-1.2/vendor/plugins/redmine_git_hosting/config/routes.rb:2:in each' /var/websites/redmine/redmine-1.2/vendor/plugins/redmine_git_hosting/config/routes.rb:2 /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:173:inload_without_new_constant_marking'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:173:in load' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/routing/route_set.rb:287:inload_routes!'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/routing/route_set.rb:287:in each' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/routing/route_set.rb:287:inload_routes!'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/routing/route_set.rb:267:in reload!' /usr/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:537:ininitialize_routing'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:188:in process' /usr/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:113:insend'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:113:in run' /var/websites/redmine/redmine-1.2/config/environment.rb:20 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:ingem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in require' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:182:inrequire'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:547:in new_constants_in' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:182:inrequire'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/tasks/misc.rake:4
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in call' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:inexecute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:inexecute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:insynchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:ininvoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:ininvoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:insynchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:ininvoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in invoke_task' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:intop_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:intop_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:intop_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 /usr/bin/rake:19:inload'
/usr/bin/rake:19

@ohthehugemanatee
Copy link

I had the same problem. I narrowed it down to an entry in the repositories table that had a repository type that redmine didn't like (I THINK that was the problem).

The only solution I could figure was to clear out that table entirely. This means that redmine loses your repos for all your projects... But at the time I only had 5 or 6 projects, so enabling them again wasn't a big deal. To re-enable a repo, just specify your SCM in the redmine project's settings "repository" tab. Since the repo already exists, it will use that. Once you've re-added those repos, fetch changesets once and it will pull in all of your old revisions (and associate them with issues etc).

@nicolasberens
Copy link
Author

the site is still in development so loosing repo data isnt problematic
im going to try it

thanks in advance

@eikek
Copy link

eikek commented Aug 5, 2011

@ohthehugemanatee thanks alot! I removed all existing repositories from the projects and the rake command was finally successful! (using chiliproject 2.1.1)

@ghost
Copy link

ghost commented Aug 11, 2011

Removing everything out of the repositories table did the trick for me as well.

@ericpaulbishop
Copy link
Owner

A number of configuration issues have been addressed in the latest version, 0.4.0 of the plugin. Please try updating to the new version if you continue to have some of these issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants