Skip to content

Instantly share code, notes, and snippets.

@imownbey
Created July 7, 2009 22:37
Show Gist options
  • Save imownbey/142418 to your computer and use it in GitHub Desktop.
Save imownbey/142418 to your computer and use it in GitHub Desktop.
ooga@placepop1 ~ $ sudo su -l ooga -c 'RAILS_ENV=production /usr/bin/rake -f /u/app/current/Rakefile --trace notifications:24hour'
(in /home/ooga)
** Invoke notifications:24hour (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute notifications:24hour
rake aborted!
can't convert nil into String
/u/app/releases/20090707220916/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb:551:in `quote'
/u/app/releases/20090707220916/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb:551:in `read_multipart'
/u/app/releases/20090707220916/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb:540:in `parse_body_0'
/u/app/releases/20090707220916/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb:522:in `parse_body'
/u/app/releases/20090707220916/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb:476:in `body='
/u/app/releases/20090707220916/vendor/rails/actionmailer/lib/action_mailer/base.rb:650:in `create_mail'
/u/app/releases/20090707220916/vendor/rails/actionmailer/lib/action_mailer/base.rb:509:in `create!'
/u/app/releases/20090707220916/vendor/rails/actionmailer/lib/action_mailer/base.rb:452:in `initialize'
/u/app/releases/20090707220916/vendor/rails/actionmailer/lib/action_mailer/base.rb:395:in `new'
/u/app/releases/20090707220916/vendor/rails/actionmailer/lib/action_mailer/base.rb:395:in `method_missing'
/u/app/releases/20090707220916/lib/tasks/notification.rake:9
/u/app/releases/20090707220916/lib/tasks/notification.rake:5:in `each'
/u/app/releases/20090707220916/lib/tasks/notification.rake:5
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `call'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `execute'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `each'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `execute'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:578:in `invoke_with_call_chain'
/usr/lib64/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in `invoke_with_call_chain'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:564:in `invoke'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2027:in `invoke_task'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `each'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1999:in `top_level'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1977:in `run'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1974:in `run'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.4/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
def update_email(user, feed_items)
recipients user.email
from "PlacePop Notification <[email protected]>"
content_type "multipart/alternative"
subject "PlacePop Update: You have #{feed_items.length} new updates today"
headers 'List-Unsubscribe' => "<#{unsubscribe_user_url(:email => user.email, :only_path => false)}>"
sent_on Time.now
body :user => user, :feed_items => feed_items
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment