1

I am using Padrino (0.13.2) with Sidekiq (4.2.7) and I have some Mailers set up in Padrino to fire off when things occur in my app.

Here's the set up info (from here, mostly)

At first, when running sidekiq with bundle exec sidekiq -r ./config/workers.rb it wasn't getting any of my environment (Models, database, etc) so that was fairly useless.

Now I'm starting it with bundle exec sidekiq ./config/boot.rb so that it has access to the entire Padrino environment. No problem, everything works great.

HOWEVER, I'm trying to send a mailer and it doesn't work.

Portal::App.delay.deliver(:user, :confirm, "John Doe", "confirmation link here")

This gets scheduled into sidekiq no problem, but when it goes to run it, it again isn't getting the padrino environment because I receive the error: WARN: RuntimeError: mailer 'user' is not registered

I can run the mailer command from the Padrino console without a problem (it sends) but when I schedule it with sidekiq it fails. Help?

Oh, I should also add that in TESTS it works!!! WTF??

Oranges13
  • 1,084
  • 1
  • 10
  • 33

0 Answers0