JohnnyDevv
JohnnyDevv

Reputation: 289

undefined method `check_delivery_params' for #<Mailgunner::DeliveryMethod:0x00

I deployed a rails 5 app to heroku. I used mailgun for sending emails and it works well in development. In production when I try to sign up a user, I get this error:

enter image description here

production.rb:

 config.action_mailer.delivery_method = :mailgun
 config.action_mailer.default_url_options = { :host => 'http://myappname.herokuapp.com', :protocol => 'https'}
 config.action_mailer.mailgun_settings = {
  domain: ENV['MAILGUN_DOMAIN'],
  api_key: ENV['MAILGUN_KEY']
 }

The MAILGUN_DOMAIN and MAILGUN_KEY were stored as environment variables in my PC. Is there something I did not do right? Thanks!

After installing figaro gem:

application.yml

development:
 MAILGUN_DOMAIN: ******************************
 MAILGUN_KEY: **************************

production:
 MAILGUN_DOMAIN: ******************************
 MAILGUN_KEY: **************************

I still get the same error!!

Upvotes: 1

Views: 193

Answers (1)

Shadwell
Shadwell

Reputation: 34784

It looks like it is related to the version of the mail gem that is installed as per this issue on mailgunner.

The workaround suggested there is to explicitly add the mail gem to your Gemfile and to lock the version to 2.6.5.

gem 'mail', '2.6.5'

You'll then need to run bundle update mail --conservative to get the new version.

Upvotes: 1

Related Questions