Closed qroac closed 12 years ago
Ok. I'll put this one on my list.
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?
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.
Hm... Thanks for the offer. I may take you up on it. Could you send me a --trace output for this failed migration?
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:in
method_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:in
class_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:in
include'
/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:in
require'
/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:in
load_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:in
require_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:in
require_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:in
each'
/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:in
require'
/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:in
load_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:in
block 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:in
load'
/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:in
load'
/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:in
load_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:in
block (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:in
block 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:in
run'
/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:in
each'
/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:in
initialize!'
/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:in
require_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:in
call'
/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:in
each'
/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:in
block 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:in
invoke_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:in
each'
/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:in
block 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:in
invoke_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:in
each'
/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:in
block 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:in
invoke_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:in
invoke_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:in
each'
/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:in
standard_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:in
block 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:in
run'
/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:in
load'
/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:in
eval'
/usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `
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.
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.
Ok. I'm going to close this bug, since the dispatcher is nolonger in use. Watch the Redmine 2.0 issue for further developments.
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?