Question

I am using the Mandrill api gem to send scheduled emails with the delayed jobs gem.

When the delayed job is executed by the worker the job is crashing at the line which creates the mandrill message with the following error:

DailyMailJob failed with NameError: uninitialized constant Mandrill::API

If I execute this job from the rails console it runs fine.

Why does this job not work when running from the worker?

Was it helpful?

Solution

I managed to fix the issue by installing the gem into the computer rather than just into the app.

The command I used to do this was:

gem install mandrill=api

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top