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

error "undefined method `[]' for nil:NilClass" when running from cron #3

Open
eppesuig opened this issue Mar 25, 2011 · 1 comment
Open

Comments

@eppesuig
Copy link

I just received this email from crontab

rake aborted!
undefined method `[]' for nil:NilClass

(See full trace by running task with --trace)

Then, connecting as root, and esecuting the command in a terminal using the --trace argument, I get this screen:

centrum:~# cd /usr/share/redmine && rake --trace redmine:send_reminders_all RAILS_ENV=production
(in /usr/share/redmine)
** Invoke redmine:send_reminders_all (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:send_reminders_all
rake aborted!
undefined method []' for nil:NilClass /usr/share/redmine/vendor/plugins/redmine_reminder/lib/tasks/reminder_all.rake:112:inreminders_all'
/usr/share/redmine/vendor/plugins/redmine_reminder/lib/tasks/reminder_all.rake:171
/usr/lib/ruby/1.8/rake.rb:636:in call' /usr/lib/ruby/1.8/rake.rb:636:inexecute'
/usr/lib/ruby/1.8/rake.rb:631:in each' /usr/lib/ruby/1.8/rake.rb:631:inexecute'
/usr/lib/ruby/1.8/rake.rb:597:in invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:insynchronize'
/usr/lib/ruby/1.8/rake.rb:590:in invoke_with_call_chain' /usr/lib/ruby/1.8/rake.rb:583:ininvoke'
/usr/lib/ruby/1.8/rake.rb:2051:in invoke_task' /usr/lib/ruby/1.8/rake.rb:2029:intop_level'
/usr/lib/ruby/1.8/rake.rb:2029:in each' /usr/lib/ruby/1.8/rake.rb:2029:intop_level'
/usr/lib/ruby/1.8/rake.rb:2068:in standard_exception_handling' /usr/lib/ruby/1.8/rake.rb:2023:intop_level'
/usr/lib/ruby/1.8/rake.rb:2001:in run' /usr/lib/ruby/1.8/rake.rb:2068:instandard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:28

I am currently uting the version shipped with Debian stable:

centrum:/usr/share/redmine# RAILS_ENV=production ruby script/about./script/../config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
About your application's environment
Ruby version 1.8.7 (i486-linux)
RubyGems version 1.3.7
Rack version 1.1
Rails version 2.3.5
Active Record version 2.3.5
Active Resource version 2.3.5
Action Mailer version 2.3.5
Active Support version 2.3.5
Edge Rails revision unknown
Application root /usr/share/redmine
Environment production
Database adapter postgresql
Database schema version 20100819172912

About your Redmine plugins
Advanced reminder 0.0.1
Redmine Attach Screenshot plugin 0.0.4
Redmine Extended Spent Time plugin 0.0.1
Redmine Newissuealerts plugin 0.0.2
Timesheet Plugin 0.6.0
Redmine Logs plugin 0.0.1

Thanks,
Giuseppe

@softanalle
Copy link

I had also problems with reminder mails interrupted (from crontab). After some debugging, I found out that we had some issues where assigned_to_id had value zero (0) instead of NULL. This was caused by error in one other program.

In my thinking the attribute validation should be done by core (redmine), but since it is not done there, plugins suffer.

yours,

Tommi

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

2 participants