Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Undefined method `haml' when rendering haml in Pony mail from scheduled job
- require 'sinatra'
- require 'haml'
- require 'pony'
- get "/execute_all/?" do
- execute_all_tests()
- Pony.mail :to => "recipients@email.com",
- :from => "do-not-reply@email.com",
- :subject => "Test results,
- :html_body => haml(:email_layout)
- redirect "/"
- end
- scheduler caught exception:
- undefined method `haml' for main:Object
- scheduler = Rufus::Scheduler.start_new
- scheduler.every '2h' do
- execute_all_tests()
- Pony.mail :to => "recipients@email.com",
- :from => "do-not-reply@email.com",
- :subject => "Test results,
- :html_body => haml(:email_layout)
- end
Add Comment
Please, Sign In to add comment