Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method 'mailgun_settings=' for ActionMailer::Base:Class #104

Closed
clorbus opened this issue Jun 10, 2017 · 9 comments
Closed

undefined method 'mailgun_settings=' for ActionMailer::Base:Class #104

clorbus opened this issue Jun 10, 2017 · 9 comments

Comments

@clorbus
Copy link

clorbus commented Jun 10, 2017

I'm consistently getting this error on server startup in an otherwise empty rails project with the following configuration:

ruby 2.3.4
rails 5.2.1
mailgun-ruby 1.1.6

development.rb

config.action_mailer.delivery_method = :mailgun
config.action_mailer.mailgun_settings = {
  api_key: "api key here",
  domain: "mailgun domain here"
}

error message

~/.rvm/gems/ruby-2.3.4/gems/actionmailer-5.1.1/lib/action_mailer/base.rb:580:in `method_missing': undefined method `mailgun_settings=' for ActionMailer::Base:Class (NoMethodError)
Did you mean?  sendmail_settings

I'm using config.action_mailer.mailgun_settings= as described in the gem's documentation. Not sure if this is a bug or a configuration issue.

@fadynaffa3
Copy link

Same with rails 4.2.8 and the minimum rails version needed is not mentioned in the documentation

@zorro2b
Copy link

zorro2b commented Jul 26, 2017

Seems you need this Gem also:
https://github.com/jorgemanrubia/mailgun_rails

@fadynaffa3
Copy link

@zorro2b This is a separate gem and it's not maintained by Mailgun themselves, but I have ended up using it alone without mailgun_ruby gem

@bramski
Copy link

bramski commented Feb 14, 2018

Resolutions? Any?

@frankvielma
Copy link

frankvielma commented Mar 21, 2018

I had a similar problem because I had the following line in the Gemfile

gem 'mailgun-ruby', '~> 1.1.9', require: 'mailgun'

I removed the "require" and all is ok now

gem 'mailgun-ruby', '~> 1.1.9'

Using Rails 3.2.17 with Ruby ruby-2.1.6

@yoonwaiyan
Copy link

same error here, using Rails 4.2.5 with Ruby 2.3.1 . Removing require doesn't work for me.

@Benjamin-Dobell
Copy link

This is Rails bug, same underlying cause as #105. Fixed by pending PR rails/rails#35419

@Benjamin-Dobell
Copy link

Should probably note there is an issue with this Gem as well, as it's causing ActionMailer::Base to autoload earlier than it ought to. Fixed in PR #162.

@Retttro
Copy link
Contributor

Retttro commented Apr 5, 2021

Version 1.2.4 with the fix is published to rubygems. Closing.
https://github.com/mailgun/mailgun-ruby/releases/tag/v1.2.4

@Retttro Retttro closed this as completed Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants