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

undefined method `copy' for nil:NilClass #33

Closed
pharao45 opened this issue Feb 5, 2014 · 5 comments
Closed

undefined method `copy' for nil:NilClass #33

pharao45 opened this issue Feb 5, 2014 · 5 comments
Assignees
Labels
Milestone

Comments

@pharao45
Copy link

pharao45 commented Feb 5, 2014

After a short while of using something went wrong :)
Do you know what the problem is?

[root@pm redmine]# rake RAILS_ENV=asynchrone redmine:recur_tasks --trace
** Invoke redmine:recur_tasks (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:recur_tasks
Checking for Redmine recurring tasks.
rake aborted!
undefined method copy' for nil:NilClass /srv/redmine/plugins/recurring_tasks/app/models/recurring_task.rb:118:inrecur_issue_if_needed!'
/srv/redmine/plugins/recurring_tasks/app/models/recurring_task.rb:146:in block in add_recurrences!' /srv/redmine/plugins/recurring_tasks/app/models/recurring_task.rb:145:ineach'
/srv/redmine/plugins/recurring_tasks/app/models/recurring_task.rb:145:in add_recurrences!' /srv/redmine/plugins/recurring_tasks/lib/tasks/recurring_tasks.rake:12:inblock (2 levels) in <top (required)>'
/usr/local/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/task.rb:236:in call' /usr/local/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/task.rb:236:inblock in execute'
/usr/local/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/task.rb:231:in each' /usr/local/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/task.rb:231:inexecute'
/usr/local/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/task.rb:175:in block in invoke_with_call_chain' /usr/local/lib/ruby/2.0.0/monitor.rb:211:inmon_synchronize'
/usr/local/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/task.rb:168:in invoke_with_call_chain' /usr/local/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/task.rb:161:ininvoke'
/usr/local/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:149:in invoke_task' /usr/local/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:106:inblock (2 levels) in top_level'
/usr/local/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:106:in each' /usr/local/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:106:inblock in top_level'
/usr/local/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:115:in run_with_threads' /usr/local/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:100:intop_level'
/usr/local/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:78:in block in run' /usr/local/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:165:instandard_exception_handling'
/usr/local/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:75:in run' /usr/local/lib/ruby/gems/2.0.0/gems/rake-10.1.1/bin/rake:33:in<top (required)>'
/usr/local/bin/rake:23:in load' /usr/local/bin/rake:23:in

'
Tasks: TOP => redmine:recur_tasks

@lnmn249
Copy link

lnmn249 commented Feb 19, 2014

Having a similar issue, However when a task needs to be regenerated, it does work.

[root@VM redmine]# rake RAILS_ENV=production redmine:recur_tasks
Checking for Redmine recurring tasks.
rake aborted!
undefined method `closed?' for nil:NilClass
/var/www/redmine/plugins/recurring_tasks/app/models/recurring_task.rb:108:in `need_to_recur?'
/var/www/redmine/plugins/recurring_tasks/app/models/recurring_task.rb:113:in `recur_issue_if_needed!'
/var/www/redmine/plugins/recurring_tasks/app/models/recurring_task.rb:146:in `block in add_recurrences!'
/var/www/redmine/plugins/recurring_tasks/app/models/recurring_task.rb:145:in `each'
/var/www/redmine/plugins/recurring_tasks/app/models/recurring_task.rb:145:in `add_recurrences!'
/var/www/redmine/plugins/recurring_tasks/lib/tasks/recurring_tasks.rake:12:in `block (2 levels) in <top (required)>'
Tasks: TOP => redmine:recur_tasks
(See full trace by running task with --trace)

With Trace:

[root@VM redmine]# rake RAILS_ENV=production redmine:recur_tasks --trace
** Invoke redmine:recur_tasks (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:recur_tasks
Checking for Redmine recurring tasks.
rake aborted!
undefined method `closed?' for nil:NilClass
/var/www/redmine/plugins/recurring_tasks/app/models/recurring_task.rb:108:in `need_to_recur?'
/var/www/redmine/plugins/recurring_tasks/app/models/recurring_task.rb:113:in `recur_issue_if_needed!'
/var/www/redmine/plugins/recurring_tasks/app/models/recurring_task.rb:146:in `block in add_recurrences!'
/var/www/redmine/plugins/recurring_tasks/app/models/recurring_task.rb:145:in `each'
/var/www/redmine/plugins/recurring_tasks/app/models/recurring_task.rb:145:in `add_recurrences!'
/var/www/redmine/plugins/recurring_tasks/lib/tasks/recurring_tasks.rake:12:in `block (2 levels) in <top (required)>'
/root/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/lib/rake/task.rb:236:in `call'
/root/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/lib/rake/task.rb:236:in `block in execute'
/root/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/lib/rake/task.rb:231:in `each'
/root/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/lib/rake/task.rb:231:in `execute'
/root/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/lib/rake/task.rb:175:in `block in invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/root/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/lib/rake/task.rb:168:in `invoke_with_call_chain'
/root/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/lib/rake/task.rb:161:in `invoke'
/root/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/lib/rake/application.rb:149:in `invoke_task'
/root/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/root/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/lib/rake/application.rb:106:in `each'
/root/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/lib/rake/application.rb:106:in `block in top_level'
/root/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/lib/rake/application.rb:115:in `run_with_threads'
/root/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/lib/rake/application.rb:100:in `top_level'
/root/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/lib/rake/application.rb:78:in `block in run'
/root/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling'
/root/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/lib/rake/application.rb:75:in `run'
/root/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/bin/rake:33:in `<top (required)>'
/root/.rvm/gems/ruby-2.1.0/bin/rake:23:in `load'
/root/.rvm/gems/ruby-2.1.0/bin/rake:23:in `<main>'
Tasks: TOP => redmine:recur_tasks

@jgeusebroek
Copy link

I am having the same issue; it did work fine however.

@nutso nutso self-assigned this Mar 1, 2014
@nutso nutso added the bug label Mar 1, 2014
nutso added a commit that referenced this issue Mar 1, 2014
nutso added a commit that referenced this issue Mar 1, 2014
nutso added a commit that referenced this issue Mar 1, 2014
@nutso nutso closed this as completed Mar 1, 2014
@jgeusebroek
Copy link

Nice! Thanks 👍

@pharao45
Copy link
Author

pharao45 commented Mar 3, 2014

I'm sorry but I do not understand. The problem is fixed in newer version?:)

@nutso
Copy link
Owner

nutso commented Mar 3, 2014

Yes, the most recent version should resolve the errors.

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

No branches or pull requests

4 participants