Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 4: EOFError: end of file reached following any email in DEVELOPMENT only

I have rails app which uses devise ofr authentication and sidekiq for background email jobs. All of a sudden, in development only, I am getting the following error associated with an attempt to send an email from the app (e.g. devise forgotten password)

     EOFError: end of file reached

Strangely the app in production works (heroku set up using sendgrid). I haven't changed any of my development email settings....

  ActionMailer::Base.default :from => '[email protected]'

    config.action_mailer.delivery_method = :smtp
    config.action_mailer.perform_deliveries = true
    config.action_mailer.raise_delivery_errors = true
    config.action_mailer.smtp_settings = {
      :address => "smtp.gmail.com",
      :port => 587,
      :domain => '@gmail.com',
      :user_name => "[email protected]",
      :password => "xxxxxxxx",
      :authentication => 'plain',
      :enable_starttls_auto => true
   }

    config.action_mailer.default_url_options = { :host => 'localhost:3000' }

I can't find anything to address this online. Also I note that ALL my apps in development, using similar settings are throwing the same error. I tried a different email address and password (again gmail) and no luck....

like image 582
GhostRider Avatar asked Apr 11 '16 14:04

GhostRider


1 Answers

For those like Aleksey wondering how the problem was solved, he added a valid domain. Went from domain: '@gmail.com' to domain: "myprojectdomain.com"

like image 52
Frank Etoundi Avatar answered Oct 26 '22 18:10

Frank Etoundi