ruby on rails 3 - Heroku + SendGrid + ActionMailer - Errno::ECONNREFUSED (Connection refused - connect(2)) -
gem 'rails', '3.2.12'
gem "devise", "~> 2.2.4"
ruby : ruby 1.9.3dev (2011-09-23 revision 33323) [i686-linux]
i tried every possible alternative/combination find on web facing unable rid of error: errno::econnrefused (connection refused - connect(2)) on heroku.
i used sendgrid credentials on development environment , working , mails delivered successfully.however on heroku facing error.
i able telnet smtp.sendgrid.net @ port 587 25.
please find config/code snippets below have in place.
/config/settings.yml
app_name: 'demoapp' default_host: <%= env['default_host'] %> # mail settings. mail: address: <%= env['mail_address'] %> port: <%= env['mail_port'] %> domain: <%= env['mail_domain'] %> user_name: <%= env['mail_user_name'] %> password: <%= env['mail_password'] %>
/config/production.rb
..... ..... ..... # settings available part of 'rails_config' gem config.action_mailer.default_url_options = { host: settings.default_host } if settings.try(:mail) config.action_mailer.smtp_settings = { address: settings.mail.try(:address), port: settings.mail.try(:port), domain: settings.mail.try(:domain), user_name: settings.mail.try(:user_name), password: settings.mail.try(:password), authentication: "plain", enable_starttls_auto: true } config.action_mailer.perform_deliveries = true config.action_mailer.raise_delivery_errors = true config.action_mailer.delivery_method = :smtp end ..... .....
/config/initializers/devise.rb
config.mailer_sender = settings.try(:mail).try(:user_name)
heroku config
$ heroku config === app config vars database_url: <db_url> default_host: app-demo.herokuapp.com heroku_postgresql_red_url: <db_url> mail_address: smtp.sendgrid.net mail_domain: heroku.com mail_password: <sendgrid_password> mail_port: 587 mail_user_name: <sendgrid_user_name> sendgrid_password: <sendgrid_password> sendgrid_username: <sendgrid_user_name>
heroku logs
$ heroku logs -t 2013-08-13t08:52:17.722266+00:00 app[web.1]: ==========devise: app17470133@heroku.com ... ... .. 2013-08-13t08:38:59.948734+00:00 app[web.1]: 2013-08-13t08:38:59.948734+00:00 app[web.1]: sent mail <user_email> (15ms) 2013-08-13t08:38:59.950628+00:00 app[web.1]: completed 500 internal server error in 229ms 2013-08-13t08:38:59.954292+00:00 app[web.1]: 2013-08-13t08:38:59.954292+00:00 app[web.1]: errno::econnrefused (connection refused - connect(2)): 2013-08-13t08:38:59.954292+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/net/smtp.rb:540:in `initialize' 2013-08-13t08:38:59.954292+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/net/smtp.rb:540:in `open' 2013-08-13t08:38:59.954292+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/net/smtp.rb:540:in `tcp_socket' 2013-08-13t08:38:59.954292+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/net/smtp.rb:550:in `block in do_start' 2013-08-13t08:38:59.954292+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/timeout.rb:66:in `timeout' 2013-08-13t08:38:59.954292+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/net/smtp.rb:549:in `do_start' 2013-08-13t08:38:59.954292+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/net/smtp.rb:519:in `start' 2013-08-13t08:38:59.954292+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/mail-2.4.4/lib/mail/network/delivery_methods/smtp.rb:144:in `deliver!' 2013-08-13t08:38:59.954463+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/mail-2.4.4/lib/mail/message.rb:2034:in `do_delivery' 2013-08-13t08:38:59.954463+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/mail-2.4.4/lib/mail/message.rb:229:in `block in deliver' 2013-08-13t08:38:59.954463+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionmailer-3.2.12/lib/action_mailer/base.rb:415:in `block in deliver_mail' 2013-08-13t08:38:59.954463+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/notifications.rb:123:in `block in instrument' 2013-08-13t08:38:59.954463+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/notifications/instrumenter.rb:20:in `instrument' 2013-08-13t08:38:59.954463+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/notifications.rb:123:in `instrument' 2013-08-13t08:38:59.954463+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionmailer-3.2.12/lib/action_mailer/base.rb:413:in `deliver_mail' 2013-08-13t08:38:59.954463+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/mail-2.4.4/lib/mail/message.rb:229:in `deliver' 2013-08-13t08:38:59.954463+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/devise-2.2.6/lib/devise/models/authenticatable.rb:175:in `send_devise_notification' 2013-08-13t08:38:59.954463+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/devise-2.2.6/lib/devise/models/confirmable.rb:147:in `send_on_create_confirmation_instructions' 2013-08-13t08:38:59.954623+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:416:in `_run__41454324238886340__create__57294411159809650__callbacks' 2013-08-13t08:38:59.954623+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:405:in `__run_callback' 2013-08-13t08:38:59.954623+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:385:in `_run_create_callbacks' 2013-08-13t08:38:59.954623+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:81:in `run_callbacks' 2013-08-13t08:38:59.954623+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.12/lib/active_record/callbacks.rb:268:in `create' 2013-08-13t08:38:59.954623+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.12/lib/active_record/persistence.rb:348:in `create_or_update' 2013-08-13t08:38:59.954623+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.12/lib/active_record/callbacks.rb:264:in `block in create_or_update' 2013-08-13t08:38:59.954623+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:403:in `_run__41454324238886340__save__57294411159809650__callbacks' 2013-08-13t08:38:59.954623+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:405:in `__run_callback' 2013-08-13t08:38:59.954623+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:385:in `_run_save_callbacks' 2013-08-13t08:38:59.955010+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:81:in `run_callbacks' 2013-08-13t08:38:59.955010+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.12/lib/active_record/callbacks.rb:264:in `create_or_update' 2013-08-13t08:38:59.955010+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.12/lib/active_record/persistence.rb:84:in `save' 2013-08-13t08:38:59.955010+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.12/lib/active_record/validations.rb:50:in `save' 2013-08-13t08:38:59.955010+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.12/lib/active_record/attribute_methods/dirty.rb:22:in `save' 2013-08-13t08:38:59.955010+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.12/lib/active_record/transactions.rb:259:in `block (2 levels) in save' 2013-08-13t08:38:59.955010+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.12/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status' 2013-08-13t08:38:59.955010+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction' 2013-08-13t08:38:59.955010+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.12/lib/active_record/transactions.rb:208:in `transaction' 2013-08-13t08:38:59.955010+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.12/lib/active_record/transactions.rb:311:in `with_transaction_returning_status' 2013-08-13t08:38:59.955157+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.12/lib/active_record/transactions.rb:259:in `block in save' 2013-08-13t08:38:59.955157+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.12/lib/active_record/transactions.rb:270:in `rollback_active_record_state!' 2013-08-13t08:38:59.955157+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.12/lib/active_record/transactions.rb:258:in `save' 2013-08-13t08:38:59.955157+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/devise-2.2.6/app/controllers/devise/registrations_controller.rb:15:in `create' 2013-08-13t08:38:59.955157+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_controller/metal/implicit_render.rb:4:in `send_action' 2013-08-13t08:38:59.955157+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/abstract_controller/base.rb:167:in `process_action' 2013-08-13t08:38:59.955157+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_controller/metal/rendering.rb:10:in `process_action' 2013-08-13t08:38:59.955157+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/abstract_controller/callbacks.rb:18:in `block in process_action' 2013-08-13t08:38:59.955157+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:436:in `_run__153182135430758755__process_action__3441329268483705872__callbacks' 2013-08-13t08:38:59.955157+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:405:in `__run_callback' 2013-08-13t08:38:59.955444+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks' 2013-08-13t08:38:59.955444+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:81:in `run_callbacks' 2013-08-13t08:38:59.955444+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/abstract_controller/callbacks.rb:17:in `process_action' 2013-08-13t08:38:59.955444+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_controller/metal/rescue.rb:29:in `process_action' 2013-08-13t08:38:59.955444+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action' 2013-08-13t08:38:59.955444+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/notifications.rb:123:in `block in instrument' 2013-08-13t08:38:59.955444+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/notifications/instrumenter.rb:20:in `instrument' 2013-08-13t08:38:59.955444+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/notifications.rb:123:in `instrument' 2013-08-13t08:38:59.955444+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_controller/metal/instrumentation.rb:29:in `process_action' 2013-08-13t08:38:59.955444+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_controller/metal/params_wrapper.rb:207:in `process_action' 2013-08-13t08:38:59.955593+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.12/lib/active_record/railties/controller_runtime.rb:18:in `process_action' 2013-08-13t08:38:59.955593+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/abstract_controller/base.rb:121:in `process' 2013-08-13t08:38:59.955593+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/abstract_controller/rendering.rb:45:in `process' 2013-08-13t08:38:59.955593+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_controller/metal.rb:203:in `dispatch' 2013-08-13t08:38:59.955593+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' 2013-08-13t08:38:59.955593+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_controller/metal.rb:246:in `block in action' 2013-08-13t08:38:59.955593+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_dispatch/routing/route_set.rb:73:in `call' 2013-08-13t08:38:59.955593+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_dispatch/routing/route_set.rb:73:in `dispatch' 2013-08-13t08:38:59.955593+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_dispatch/routing/route_set.rb:36:in `call' 2013-08-13t08:38:59.955593+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_dispatch/routing/mapper.rb:42:in `call' 2013-08-13t08:38:59.955882+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call' 2013-08-13t08:38:59.955882+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/journey-1.0.4/lib/journey/router.rb:56:in `each' 2013-08-13t08:38:59.955882+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/journey-1.0.4/lib/journey/router.rb:56:in `call' 2013-08-13t08:38:59.955882+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_dispatch/routing/route_set.rb:601:in `call' 2013-08-13t08:38:59.955882+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:35:in `block in call' 2013-08-13t08:38:59.955882+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `catch' 2013-08-13t08:38:59.955882+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `call' 2013-08-13t08:38:59.955882+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' 2013-08-13t08:38:59.955882+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/etag.rb:23:in `call' 2013-08-13t08:38:59.955882+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/conditionalget.rb:35:in `call' 2013-08-13t08:38:59.956030+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_dispatch/middleware/head.rb:14:in `call' 2013-08-13t08:38:59.956030+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_dispatch/middleware/params_parser.rb:21:in `call' 2013-08-13t08:38:59.956030+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_dispatch/middleware/flash.rb:242:in `call' 2013-08-13t08:38:59.956030+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context' 2013-08-13t08:38:59.956030+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call' 2013-08-13t08:38:59.956030+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_dispatch/middleware/cookies.rb:341:in `call' 2013-08-13t08:38:59.956030+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.12/lib/active_record/query_cache.rb:64:in `call' 2013-08-13t08:38:59.956030+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call' 2013-08-13t08:38:59.956030+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call' 2013-08-13t08:38:59.956030+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:405:in `_run__2319839898307092388__call__57294411159809650__callbacks' 2013-08-13t08:38:59.956315+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:405:in `__run_callback' 2013-08-13t08:38:59.956315+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:385:in `_run_call_callbacks' 2013-08-13t08:38:59.956315+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:81:in `run_callbacks' 2013-08-13t08:38:59.956315+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_dispatch/middleware/callbacks.rb:27:in `call' 2013-08-13t08:38:59.956315+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_dispatch/middleware/remote_ip.rb:31:in `call' 2013-08-13t08:38:59.956315+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call' 2013-08-13t08:38:59.956315+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' 2013-08-13t08:38:59.956315+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/rack/logger.rb:32:in `call_app' 2013-08-13t08:38:59.956315+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/rack/logger.rb:16:in `block in call' 2013-08-13t08:38:59.956315+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/tagged_logging.rb:22:in `tagged' 2013-08-13t08:38:59.956460+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/rack/logger.rb:16:in `call' 2013-08-13t08:38:59.956460+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_dispatch/middleware/request_id.rb:22:in `call' 2013-08-13t08:38:59.956460+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call' 2013-08-13t08:38:59.956460+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call' 2013-08-13t08:38:59.956460+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/cache/strategy/local_cache.rb:72:in `call' 2013-08-13t08:38:59.956460+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call' 2013-08-13t08:38:59.956460+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_dispatch/middleware/static.rb:62:in `call' 2013-08-13t08:38:59.956460+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward' 2013-08-13t08:38:59.956460+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in `pass' 2013-08-13t08:38:59.956460+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in `invalidate' 2013-08-13t08:38:59.956749+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in `call!' 2013-08-13t08:38:59.956749+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call' 2013-08-13t08:38:59.956749+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/engine.rb:479:in `call' 2013-08-13t08:38:59.956749+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/application.rb:223:in `call' 2013-08-13t08:38:59.956749+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/content_length.rb:14:in `call' 2013-08-13t08:38:59.956749+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/rack/log_tailer.rb:17:in `call' 2013-08-13t08:38:59.956749+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/handler/webrick.rb:59:in `service' 2013-08-13t08:38:59.956749+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service' 2013-08-13t08:38:59.956749+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run' 2013-08-13t08:38:59.956749+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread' 2013-08-13t08:38:59.956897+00:00 app[web.1]: 2013-08-13t08:38:59.956897+00:00 app[web.1]:
thanks, jignesh
following solution worked:
moved actionmailer smtp settings , default_url_options initializer file:
/config/initializers/smtp.rb
# settings available part of 'rails_config' gem actionmailer::base.default_url_options = { host: settings.default_host } if settings.try(:mail) actionmailer::base.smtp_settings = { address: settings.mail.try(:address), port: settings.mail.try(:port), domain: settings.mail.try(:domain), user_name: settings.mail.try(:user_name), password: settings.mail.try(:password), authentication: :plain, enable_starttls_auto: true } end
in environment files (config/development.rb, config/production.rb) kept delivery specific config:
config/production.rb
config.action_mailer.perform_deliveries = true config.action_mailer.raise_delivery_errors = true config.action_mailer.delivery_method = :smtp
a million ton @swift providing guidance here: https://stackoverflow.com/a/11583287/936494
thanks,
jignesh
Comments
Post a Comment