jorgemanrubia / mailgun_rails

Rails Action Mailer adapter for Mailgun
MIT License
210 stars 70 forks source link

Development environment: RestClient::ResourceNotFound (404 Resource Not Found) #61

Closed ArielAleksandrus closed 8 years ago

ArielAleksandrus commented 8 years ago

I'm using this gem to work with Devise.

in develoment.rb file, I have

config.action_mailer.delivery_method = :mailgun
config.action_mailer.mailgun_settings = {
  api_key: 'key-944123xxxxxxxxxxxxxxxxxxxxxxxaa0',
  domain: 'sandboxd34xxxxxxxxxxxxxxxxxxxxxxx20a105'
}

I have a Mailer Class, mailgun_devise_mailer.rb

class MailgunDeviseMailer < Devise::Mailer
    helper :application
    include Devise::Controllers::UrlHelpers
    default template_path: 'devise/mailer'
end

and the proper link to devise, in devise.rb:

config.mailer = 'MailgunDeviseMailer'

But when I register a user, I get a

RestClient::ResourceNotFound (404 Resource Not Found) error

Completed 500 Internal Server Error in 1202ms

RestClient::ResourceNotFound (404 Resource Not Found): app/controllers/clients/registrations_controller.rb:15:in `create'

Rendered /home/aleksandrus/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/_source.erb (9.0ms) Rendered /home/aleksandrus/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (3.8ms) Rendered /home/aleksandrus/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.3ms) Rendered /home/aleksandrus/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (25.4ms) Rendered /home/aleksandrus/.rvm/gems/ruby-2.2.1/gems/web-console-2.3.0/lib/web_console/templates/_markup.html.erb (0.3ms) Rendered /home/aleksandrus/.rvm/gems/ruby-2.2.1/gems/web-console-2.3.0/lib/web_console/templates/_inner_console_markup.html.erb within layouts/inlined_string (0.3ms) Rendered /home/aleksandrus/.rvm/gems/ruby-2.2.1/gems/web-console-2.3.0/lib/web_console/templates/_prompt_box_markup.html.erb within layouts/inlined_string (0.3ms) Rendered /home/aleksandrus/.rvm/gems/ruby-2.2.1/gems/web-console-2.3.0/lib/web_console/templates/style.css.erb within layouts/inlined_string (0.3ms) Rendered /home/aleksandrus/.rvm/gems/ruby-2.2.1/gems/web-console-2.3.0/lib/web_console/templates/console.js.erb within layouts/javascript (13.0ms) Rendered /home/aleksandrus/.rvm/gems/ruby-2.2.1/gems/web-console-2.3.0/lib/web_console/templates/main.js.erb within layouts/javascript (0.2ms) Rendered /home/aleksandrus/.rvm/gems/ruby-2.2.1/gems/web-console-2.3.0/lib/web_console/templates/error_page.js.erb within layouts/javascript (0.3ms) Rendered /home/aleksandrus/.rvm/gems/ruby-2.2.1/gems/web-console-2.3.0/lib/web_console/templates/index.html.erb (25.0ms)

Why would it happen?