kubitron / redmine_git_hosting

A ChiliProject/Redmine plugin which makes configuring your own git hosting easy.
78 stars 15 forks source link

dispatcher removed in RoR 3 #58

Closed qroac closed 12 years ago

qroac commented 12 years ago

When doing db:migrate_plugins I got this error:

rake aborted! cannot load such file -- dispatcher

Searching for a solution I found the following thread in Redmine Bugtracker: http://www.redmine.org/issues/11035 It seems that 'dispatcher' was removed in Rails 3 so of cource it cannot be loaded.

Could you please fix this problem so the Plugin can be used with Rails 3?

kubitron commented 12 years ago

Ok. I'll put this one on my list.

kubitron commented 12 years ago

Ok. I think that I have a solution. However, I don't have a Rails 3 environment in which to test yet. Further -- if you are attempting to use this with Redmine 1.4 or 2.0, the plugin hasn't been updated there yet.

With those caveats, you could try pulling from my 'testing' branch to see if the problem goes away. Could you let me know?

qroac commented 12 years ago

Thanks for the bugfix. But migration doesn't work at all:

rake aborted! undefined method `named_scope' for #Class:0x00000003eae478

Tasks: TOP => db:migrate_plugins => redmine:plugins:migrate => environment

This installation is not yet used in productivity, so I could give you ssh access if you send me your public key. So you could play around with redmine 2.0 in a Rails 3.2 environment.

kubitron commented 12 years ago

Hm... Thanks for the offer. I may take you up on it. Could you send me a --trace output for this failed migration?

qroac commented 12 years ago

b$ rake db:migrate_plugins RAILS_ENV=production rake aborted! undefined method `named_scope' for #Class:0x00000003c67458

Tasks: TOP => db:migrate_plugins => redmine:plugins:migrate => environment (See full trace by running task with --trace) web57@capela:~/web$ rake db:migrate_plugins --trace RAILS_ENV=production * Invoke db:migrate_plugins (first_time) * Invoke redmine:plugins:migrate (first_time) * Invoke environment (first_time) * Execute environment rake aborted! undefined method named_scope' for #<Class:0x00000004126ac0> /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.6/lib/active_record/dynamic_matchers.rb:50:inmethod_missing' /var/www/clients/client1/web57/web/plugins/redmine_git_hosting/lib/git_hosting/patches/project_patch.rb:13:in block in included' /var/www/clients/client1/web57/web/plugins/redmine_git_hosting/lib/git_hosting/patches/project_patch.rb:10:inclass_eval' /var/www/clients/client1/web57/web/plugins/redmine_git_hosting/lib/git_hosting/patches/project_patch.rb:10:in included' /var/www/clients/client1/web57/web/plugins/redmine_git_hosting/lib/git_hosting/patches/project_patch.rb:29:ininclude' /var/www/clients/client1/web57/web/plugins/redmine_git_hosting/lib/git_hosting/patches/project_patch.rb:29:in <top (required)>' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:inrequire' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in block in require' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:inload_dependency' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in require' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:359:inrequire_or_load' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:313:in depend_on' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:225:inrequire_dependency' /var/www/clients/client1/web57/web/plugins/redmine_git_hosting/init.rb:57:in block in <top (required)>' /var/www/clients/client1/web57/web/plugins/redmine_git_hosting/init.rb:56:ineach' /var/www/clients/client1/web57/web/plugins/redmine_git_hosting/init.rb:56:in <top (required)>' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:inrequire' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in block in require' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:inload_dependency' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in require' /var/www/clients/client1/web57/web/lib/redmine/plugin.rb:129:inblock in load' /var/www/clients/client1/web57/web/lib/redmine/plugin.rb:120:in each' /var/www/clients/client1/web57/web/lib/redmine/plugin.rb:120:inload'

/var/www/clients/client1/web57/web/config/initializers/30-redmine.rb:13:in <top (required)>' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:inload' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in block in load' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:inload_dependency' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in load' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/engine.rb:588:inblock (2 levels) in class:Engine' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/engine.rb:587:in each' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/engine.rb:587:inblock in class:Engine' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/initializable.rb:30:in instance_exec' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/initializable.rb:30:inrun' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/initializable.rb:55:in block in run_initializers' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/initializable.rb:54:ineach' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/initializable.rb:54:in run_initializers' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/application.rb:136:ininitialize!' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/railtie/configurable.rb:30:in method_missing' /var/www/clients/client1/web57/web/config/environment.rb:14:in<top (required)>' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/application.rb:103:in require' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/application.rb:103:inrequire_environment!' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/application.rb:292:in block (2 levels) in initialize_tasks' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:205:incall' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in block in execute' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:200:ineach' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in execute' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:158:inblock in invoke_with_call_chain' /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in mon_synchronize' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:151:ininvoke_with_call_chain' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:176:in block in invoke_prerequisites' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:174:ineach' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:174:in invoke_prerequisites' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:157:inblock in invoke_with_call_chain' /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in mon_synchronize' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:151:ininvoke_with_call_chain' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:176:in block in invoke_prerequisites' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:174:ineach' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:174:in invoke_prerequisites' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:157:inblock in invoke_with_call_chain' /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in mon_synchronize' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:151:ininvoke_with_call_chain' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:144:in invoke' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:116:ininvoke_task' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in block (2 levels) in top_level' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:ineach' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in block in top_level' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:instandard_exception_handling' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:88:in top_level' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:66:inblock in run' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in standard_exception_handling' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:63:inrun' /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/bin/rake:33:in <top (required)>' /usr/local/rvm/gems/ruby-1.9.3-p194@global/bin/rake:19:inload' /usr/local/rvm/gems/ruby-1.9.3-p194@global/bin/rake:19:in <main>' /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:ineval' /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `

' Tasks: TOP => db:migrate_plugins => redmine:plugins:migrate => environment

kubitron commented 12 years ago

Ok. I see you are using Rails 3.2 which has completely removed a bunch of deprecated things, including named_scopes. I suspect that this problem would go away if you downgraded to Rails 3.1.

I suspect that making a completely Rails-3 version of this plugin may be necessary, rather than trying to maintain compatibility across versions.

qroac commented 12 years ago

Ok, so it seems I have to wait for it. I'd like to use Redmine 2 and that requires to use Rails 3.2. Thanks for your answer.

kubitron commented 12 years ago

Ok. I'm going to close this bug, since the dispatcher is nolonger in use. Watch the Redmine 2.0 issue for further developments.