Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

NoMethodError: undefined method `scoped' - Redmine 3.03 #49

Open
ntonyl opened this issue Jul 6, 2015 · 2 comments
Open

NoMethodError: undefined method `scoped' - Redmine 3.03 #49

ntonyl opened this issue Jul 6, 2015 · 2 comments

Comments

@ntonyl
Copy link

ntonyl commented Jul 6, 2015

When I try to send the notification i have this error :

** Invoke redmine:reminder_plugin:send_notifications (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:reminder_plugin:send_notifications
rake aborted!
NoMethodError: undefined method scoped' for #<Issue::ActiveRecord_Relation:0x00000004cf34e8> /var/lib/gems/1.9.1/gems/activerecord-4.2.3/lib/active_record/relation/delegation.rb:136:inmethod_missing'
/var/lib/gems/1.9.1/gems/activerecord-4.2.3/lib/active_record/relation/delegation.rb:99:in method_missing' /opt/redmine/redmine-3.0/plugins/due_date_reminder/app/models/reminder_mailer.rb:33:infind_issues'
/opt/redmine/redmine-3.0/plugins/due_date_reminder/app/models/reminder_mailer.rb:15:in due_date_notifications' /opt/redmine/redmine-3.0/plugins/due_date_reminder/lib/tasks/reminder.rake:5:inblock (4 levels) in <top (required)>'
/opt/redmine/redmine-3.0/app/models/mailer.rb:383:in with_synched_deliveries' /opt/redmine/redmine-3.0/plugins/due_date_reminder/lib/tasks/reminder.rake:4:inblock (3 levels) in <top (required)>'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:240:in call' /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:240:inblock in execute'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:235:in each' /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:235:inexecute'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:179:in block in invoke_with_call_chain' /usr/lib/ruby/1.9.1/monitor.rb:211:inmon_synchronize'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:172:in invoke_with_call_chain' /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:165:ininvoke'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:150:in invoke_task' /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:106:inblock (2 levels) in top_level'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:106:in each' /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:106:inblock in top_level'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:115:in run_with_threads' /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:100:intop_level'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:78:in block in run' /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:176:instandard_exception_handling'
/var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:75:in run' /var/lib/gems/1.9.1/gems/rake-10.4.2/bin/rake:33:in<top (required)>'
/usr/local/bin/rake:23:in load' /usr/local/bin/rake:23:in

'
Tasks: TOP => redmine:reminder_plugin:send_notifications

@ardahaal
Copy link
Contributor

Hi, I just had the same issue. Redmine 3.x uses Rails 4+ so method "scoped" is deprecated for models. Use "all" to match all objects or "where" to match some objects with conditions. You should be ok.

@ardahaal
Copy link
Contributor

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

No branches or pull requests

2 participants