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 I could find on web but facing am unable to get rid of this error: Errno::ECONNREFUSED (Connection refused - connect(2)) on Heroku.
I used the sendgrid credentials on development environment and they are working and mails are delivered successfully.However on Heroku only I am facing the error.
I am able to successfully telnet to smtp.sendgrid.net at port 587 as well as 25.
Please find the config/code snippets below I 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 is available as 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 to <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 is the solution which worked:
Moved ActionMailer SMTP settings and default_url_options to a initializer file:
/config/initializers/smtp.rb
# Settings is available as 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 the environment files (config/development.rb, config/production.rb) kept just the 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 thanks to #swift for providing his guidance here: https://stackoverflow.com/a/11583287/936494
Thanks,
Jignesh
Related
I tried to implement logging and sign up with devise, omniauth and facebook. Now it looks like the facebook implementation works but whenever I try to log in the hroku site through facebook, it renders an error and says: "Check your logs.
Here are my logs:
2015-05-17T18:23:35.994186+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/application.rb:144:in `call' 2015-05-17T18:23:35.994189+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/handler/webrick.rb:60:in `service' 2015-05-17T18:23:35.994188+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/content_length.rb:14:in `call' 2015-05-17T18:23:35.994191+00:00 app[web.1]: vendor/ruby- 2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service' 2015-05- 17T18:23:35.994193+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/
webrick/server.rb:295:in `block in start_thread'
2015-05-17T18:23:35.994192+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2015-05-17T18:23:35.994194+00:00 app[web.1]:
2015-05-17T18:23:35.994195+00:00 app[web.1]:
2015-05-17T18:25:56.190647+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=unstarv.herokuapp.com request_id=e7b2dd76-e168-4266-9937-7043f922 1f fwd="158.222.193.118" dyno=web.1 connect=1ms service=3ms status=304 bytes=133 2015-05-17T18:26:04.445519+00:00 heroku[router]: at=info method=GET path="/users/auth/facebook" host=unstarv.herokuapp.com request_id=b8db408e-b809-4c7a-a0d1-a43c84cd4b0c fwd="158.222.193.118" dyno=web.1 connect=2ms service=7ms status=302 bytes=2216 2015-05 17T18:26:04.568894+00:00 app[web.1]: Started GET "/users/auth/facebook" for 158.222.193.118 at 2015-05-17 18:26:04 +0000 2015-05 17T18:26:04.777296+00:00 app[web.1]: Started GET "/users/auth/facebook" for 158.222.193.118 at 2015-05-17 18:26:04 +0000 2015-05-17T18:26:04.570840+00:00 app[web.1]: (facebook) Request phase initiated. 2015-05-17T18:26:04.778818+00:00 app[web.1]: (facebook) Request phase initiated.
2015-05-17T18:26:04.653315+00:00 heroku[router]: at=info method=GET path="/users/auth/facebook" host=unstarv.herokuapp.com request_id=ae31cf01-31f1-49bc-ac48-e75ef6adc128 fwd="158.222.193.118" dyno=web.1 connect=0ms service=6ms status=302 bytes=2216 2015-05-17T18:26:05.068973+00:00 app[web.1]: Started GET"/users/auth/facebook/callback code=AQAcbQnJ0PzHQ3V4VXBUiFGM9XLOU69rdc1DyFcgNMOl0g5tVJgjJEoyrzjZFf552LkokSwjx-yelsbi8JIfwIWMrZp-mg0e8APWaOY1PhxWMe9---Nc_dsqpf7xVVScoRW RxHeByV553pCt7a8DWxErbBphKE1ZXT7jEK0oTmDDzocYycNwVTD8UAbrPl6PuLMYo6DAYsnkYtJbo21fnaskFyrHbKHrIbtGFKVpMGPPwD8k1aqx720LK4V2DOG_wLoeCQoQv2yBsHEBxr_tMFgE6UR1pCjPvUglQPqlxX7zU0bh4o_AfppcOpQ&state=ed94cae9b2066f6b0823907259f6df3f166a18cd5bc39674" for 158.222.193.118 at 2015-05-17 18:26:05 +0000 2015 0517T18:26:05.070832+00:00 app[web.1]: (facebook) Callback phaseinitiated
2015-05-17T18:26:05.344081+00:00 app[web.1]: Processing by OmniauthCallbacksController#facebook as HTML 2015-05-17T18:26:05.344091+00:00 app[web.1]: Parameters: {"code"=>"AQAcbQnJ0PzHQ3V4VXBUiFGM9XLOU69rdc1DyFcgNMOl0g5tVJgjJEoyrzjZFf552LkokSwjx-yelsbi8JIfwIWMrZp-mg0e8APWaOY1PhxWMe9--BKzcCHRfqu2h1P5WwMwSjUpN70t_PuHpafIuQh2bYvkjEbNNi1-Nc_dsqpf7xVVScoRW-RxHeByV553pCt7a8DWxErbBphKE1ZXT7jEK0oTmDDzocYycNwVTD8UAbrPl6PuLMYo6DAYsnkYtJbo21fnaskFyrHbKHrIbtGFKVpMGPPwD8k1aqx720LK4V2DOG_wLoeCQoQv2yBsHEBxr_tMFgE6UR1pCjPvUglQPqlxX7zU0bh4o_AfppcOpQ","state"=>"ed94cae9b2066f6b0823907259f6df3f166a18cd5bc39674"} 2015-05-17T18:26:05.355010+00:00 app[web.1]: Completed 500 Internal Server Errorin 11ms 2015-05-17T18:26:05.230943+00:00 heroku[router]: at=info method=GET path="/users/auth/facebook/callback?code=AQAcbQnJ0PzHQ3V4VXBUiFGM9XLOU69rdc1DyFcgNMOl0g5tVJgjJEoyrzjZFf552LkokSwjx-yelsbi8JIfwIWMrZp-mg0e8APWaOY1PhxWMe9--BKzcCHRfqu2h1P5WwMwSjUpN70t_PuHpafIuQh2bYvkjEbNNi1-Nc_dsqpf7xVVScoRW-RxHeByV553pCt7a8DWxErbBphKE1ZXT7jEK0oTmDDzocYycNwVTD8UAbrPl6PuLMYo6DAYsnkYtJbo21fnaskFyrHbKHrIbtGFKVpMGPPwD8k1aqx720LK4V2DOG_wLoeCQoQv2yBsHEBxr_tMFgE6UR1pCjPvUglQPqlxX7zU0bh4o_AfppcOpQ&state=ed94cae9b2066f6b0823907259f6df3f166a18cd5bc39674" host=unstarv.herokuapp.com request_id=47ffd209-44db-44b0-b772-02a987639e25 fwd="158.222.193.118" dyno=web.1 connect=1ms service=292ms status=500 bytes=1754 2015-05-17T18:26:05.357087+00:00 app[web.1]: 2015-05-17T18:26:05.357089+00:00 app[web.1]: NoMethodError (undefined method `current_sign_in_at' for<User:0x007f134796b0e8>):20150517T18:26:05.357091+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activemodel-4.1.8/lib/active_model/attribute_methods.rb:435:in `method_missing'2015-05-17T18:26:05.357092+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord4.1.8/lib/active_record/attribute_methods.rb:213:in `method_missing' 2015-05-17T18:26:05.357093+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/devise-3.4.1/lib/devise/models/trackable.rb:19:in `update_tracked_fields'2015-05-17T18:26:05.357095+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/devise-3.4.1/lib/devise/models/trackable.rb:32:in `update_tracked_fields!'2015-05-17T18:26:05.357096+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/devise-3.4.1/lib/devise/hooks/trackable.rb:7:in `block in <top (required)>'2015-05-17T18:26:05.357098+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/hooks.rb:14:in `call'
2015-05-17T18:26:05.357099+00:00 app[web.1]:vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/hooks.rb:14:in `block in _run_callbacks'2015-05-17T18:26:05.357100+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/hooks.rb:9:in `each'2015 05-17T18:26:05.357101+00:00 app[web.1]:vendor/bundle/ruby/2.0.0/gems/warden- 1.2.3/lib/warden/hooks.rb:9:in `_run_callbacks'2015-05n17T18:26:05.357102+00:00 app[web.1]:vendor/bundle/ruby/2.0.0/gems/warden1.2.3/lib/warden/manager.rb:53:in `_run_callbacks'
2015-05-17T18:26:05.357104+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/proxy.rb:179:in `set_user'2015-05-17T18:26:05.357105+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/devise3.4.1/lib/devise/controllers/sign_in_out.rb:43:in `sign_in'2015-05-17T18:26:05.357106+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/devise3.4.1/lib/devise/controllers/helpers.rb:235:in `sign_in_and_redirect'2015-05-17T18:26:05.357107+00:00 app[web.1]: (eval):6:in `facebook' 2015-05-17T18:26:05.357109+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_controller/metal/implicit_render.rb:4:in `send_action'2015-05-17T18:26:05.357110+00:00 app[web.1]:vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/abstract_controller/base.rb:189:in `process_action'2015-05-17T18:26:05.357113+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_controller/metal/rendering.rb:10:in `process_action' 2015-05-17T18:26:05.357114+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack/4.1.8/lib/abstract_controller/callbacks.rb:20:in `block in process_action'2015-05-17T18:26:05.357115+00:00 app[web.1]:vendor/bundle/ruby/2.0.0/gems/activesupport 4.1.8/lib/active_support/callbacks.rb:113:in `call'2015-05-17T18:26:05.357116+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport4.1.8/lib/active_support/callbacks.rb:113:in `call'2015-05-17T18:26:05.357118+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport4.1.8/lib/active_support/callbacks.rb:229:in `block in halting'2015-05-17T18:26:05.357119+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport4.1.8/lib/active_support/callbacks.rb:229:in `call'2015-05-17T18:26:05.357121+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport4.1.8/lib/active_support/callbacks.rb:229:in `block in halting' 2015-05-17T18:26:05.357122+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport/4.1.8/lib/active_support/callbacks.rb:166:in `call' 2015-05-17T18:26:05.357123+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:166:in `block in halting'
2015-05-17T18:26:05.357124+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:166:in `call' \
2015-05-17T18:26:05.357125+00:00 app[web.1]:vendor/bundle/ruby/2.0.0/gems/activesupport4.1.8/lib/active_support/callbacks.rb:166:in `block in halting'
2015-05-17T18:26:05.357127+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport4.1.8/lib/active_support/callbacks.rb:166:in `call' 2015-05-17T18:26:05.357128+00:00 app[web.1]:vendor/bundle/ruby/2.0.0/gems/activesupport4.1.8/lib/active_support/callbacks.rb:166:in `block in halting'2015-05-17T18:26:05.357129+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport4.1.8/lib/active_support/callbacks.rb:166:in `call'
2015-05-17T18:26:05.357130+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:166:in `block in halting'
2015-05-17T18:26:05.357131+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:166:in `call 2015-05-17T18:26:05.357132+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport4.1.8/lib/active_support/callbacks.rb:166:in `block in halting'
2015-05-17T18:26:05.357134+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport4.1.8/lib/active_support/callbacks.rb:86:in `call'
2015-05-17T18:26:05.357135+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport4.1.8/lib/active_support/callbacks.rb:86:in `run_callbacks'
2015-05-17T18:26:05.357136+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack/lib/abstract_controller/callbacks.rb:19:in `process_action'
2015-05-17T18:26:05.357137+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_controller/metal/rescue.rb:29:in `process_action'
2015-05-17T18:26:05.357138+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_controller/metal/instrumentation.rb:31:in `block in process_action' 2015-05-17T18:26:05.357139+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/notifications.rb:159:in `block in instrument
'2015-05-17T18:26:05.357144+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport4.1.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
2015-05-17T18:26:05.357145+00:00 app[web.1]:vendor/bundle/ruby/2.0.0/gems/activesupport4.1.8/lib/active_support/notifications.rb:159:in `instrument'
2015-05-17T18:26:05.357146+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
2015-05-17T18:26:05.357148+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'2015-05-17T18:26:05.357149+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord4.1.8/lib/active_record/railties/controller_runtime.rb:18:in `process_action'2015-05-17T18:26:05.357150+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.8/lib/abstract_controller/base.rb:136:in `process'2015-05-17T18:26:05.357151+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionview4.1.8/lib/action_view/rendering.rb:30:in `process'2015-05-17T18:26:05.357152+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_controller/metal.rb:196:in `dispatch'2015-05-17T18:26:05.357153+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'2015-05-17T18:26:05.357154+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.8/lib/action_controller/metal.rb:232:in `block in action'
2015-05-17T18:26:05.357156+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.8/lib/action_dispatch/routing/route_set.rb:82:in `call'
2015-05-17T18:26:05.357157+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_dispatch/routing/route_set.rb:82:in `dispatch'
2015-05-17T18:26:05.357158+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_dispatch/routing/route_set.rb:50:in `call' 2015-05-17T18:26:05.357159+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_dispatch/routing/mapper.rb:45:in `call'2015-05-17T18:26:05.357161+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_dispatch/journey/router.rb:73:in `block in call'2015-05-17T18:26:05.357162+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_dispatch/journey/router.rb:59:in `each'
2015-05-17T18:26:05.357163+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_dispatch/journey/router.rb:59:in `call' 2015-05-17T18:26:05.357164+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_dispatch/routing/route_set.rb:678:in `call'
2015-05-17T18:26:05.357165+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:404:in `call_app!'
2015-05-17T18:26:05.357166+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:362:in `callback_phase'
2015-05-17T18:26:05.357168+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-oauth2-1.3.0/lib/omniauth/strategies/oauth2.rb:75:in `callback_phase'
2015-05-17T18:26:05.357169+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauthfacebook2.0.1/lib/omniauth/strategies/facebook.rb:73:in `block in callback_phase'
2015-05-17T18:26:05.357170+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauthfacebook2.0.1/lib/omniauth/strategies/facebook.rb:136:in `with_authorization_code!'
2015-05-17T18:26:05.357171+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-facebook2.0.1/lib/omniauth/strategies/facebook.rb:72:in `callback_phase'
2015-05-17T18:26:05.357173+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:227:in `callback_call' 2015-05-17T18:26:05.357174+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:184:in `call!'
2015-05-17T18:26:05.357175+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:164:in `call'
2015-05-17T18:26:05.357176+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/builder.rb:59:in `call'
2015-05-17T18:26:05.357177+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'
2015-05-17T18:26:05.357178+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `catch'
2015-05-17T18:26:05.357180+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `call'
2015-05-17T18:26:05.357181+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/etag.rb:23:in `call'
2015-05-17T18:26:05.357182+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/conditionalget.rb:25:in `call'
2015-05-17T18:26:05.357183+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/head.rb:11:in `call'
2015-05-17T18:26:05.357184+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
2015-05-17T18:26:05.357185+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_dispatch/middleware/flash.rb:254:in `call'
2015-05-17T18:26:05.357187+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/session/abstract/id.rb:225:in `context'
2015-05-17T18:26:05.357188+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/session/abstract/id.rb:220:in `call'
2015-05-17T18:26:05.357189+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_dispatch/middleware/cookies.rb:560:in `call'
2015-05-17T18:26:05.357190+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord4.1.8/lib/active_record/query_cache.rb:36:in `call'
2015-05-17T18:26:05.357194+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord4.1.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
2015-05-17T18:26:05.357196+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
2015-05-17T18:26:05.357197+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:82:in `run_callbacks'
2015-05-17T18:26:05.357198+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2015-05-17T18:26:05.357199+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
2015-05-17T18:26:05.357200+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
2015-05-17T18:26:05.357201+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2015-05-17T18:26:05.357202+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/rack/logger.rb:38:in `call_app'
2015-05-17T18:26:05.357204+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/rack/logger.rb:20:in `block in call'
2015-05-17T18:26:05.357205+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport4.1.8/lib/active_support/tagged_logging.rb:68:in `block in tagged'
2015-05-17T18:26:05.357206+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport4.1.8/lib/active_support/tagged_logging.rb:26:in `tagged'
2015-05-17T18:26:05.357207+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport4.1.8/lib/active_support/tagged_logging.rb:68:in `tagged'
2015-05-17T18:26:05.357208+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/rack/logger.rb:20:in `call'
2015-05-17T18:26:05.357209+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2015-05-17T18:26:05.357211+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/methodoverride.rb:21:in `call'
2015-05-17T18:26:05.357212+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/runtime.rb:17:in `call'
2015-05-17T18:26:05.357213+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport4.1.8/lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
2015-05-17T18:26:05.357214+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack4.1.8/lib/action_dispatch/middleware/static.rb:84:in `call'
2015-05-17T18:26:05.357215+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/sendfile.rb:112:in `call'
2015-05-17T18:26:05.357216+00:00 app
in `call'
2015-05-17T18:26:05.357217+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/application.rb:144:in `call'
2015-05-17T18:26:05.357219+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/lock.rb:17:in `call'
2015-05-17T18:26:05.357220+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/content_length.rb:14:in `call'
2015-05-17T18:26:05.357221+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/handler/webrick.rb:60:in `service'
2015-05-17T18:26:05.357222+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2015-05-17T18:26:05.357223+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2015-05-17T18:26:05.357224+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2015-05-17T18:26:05.357225+00:00 app[web.1]:
2015-05-17T18:26:05.357226+00:00 app[web.1]:
2015-05-17T18:26:05.361104+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=unstarv.herokuapp.com request_id=a24209c3-7d23-487c-b67b-b729060cb473 fwd="158.222.193.118" dyno=web.1 connect=0ms service=6ms status=304 bytes=133
The root of your problem is here:
undefined method `current_sign_in_at' for<User:0x007f134796b0e8>):20150517T18:26:05.357091+00:00 app[web.1]:
I would guess that you haven't migrated your database to contain that field as the User object is there but the field/method is not.
I'm upgrading my rails app using Paperclip and uploading my attachments via ftp (using paperclipftp gem). I'm currently in my development environment which includes Rails 3.1.1, Ruby ruby 1.9.2p290, paperclip 3.0.4, aws-sdk 1.8.1.2
I've made changes to my app to utilize the aws-sdk gem to utilize amazon s3 for my attachment storage. Here's what I have in my Gemfile:
gem 'mysql2'
gem 'execjs'
gem 'web-app-theme', '~> 0.8.0'
gem 'therubyracer', :platforms => :ruby
gem 'paperclip', '~> 3.0.0'
gem 'tinymce-rails'
gem 'cocaine', '~> 0.3.2'
gem 'aws-sdk'
In my model I define the attachment with:
#paperclip
has_attached_file :upload,
:styles => Proc.new { |attach| attach.instance.attachment_styles },
:storage => :s3,
:s3_credentials => Rails.root.join('config', 's3.yml'),
:path => "/:attachment/:id/:style/:basename.:extension",
:url => "http://" + FTP_CONFIG['file_host'] + "/:attachment/:id/:style/:basename.:extension"
My s3.yml file looks like:
development:
bucket: a36-dev
access_key_id: #########
secret_access_key: ##########
test:
bucket: a36-test
access_key_id: #########
secret_access_key: #########
production:
bucket: a36-prod
access_key_id: #########
secret_access_key: #########
The error I continue to get is:
Errno::ECONNABORTED in MediaController#create_for_content
An established connection was aborted by the software in your host machine
Here's the stack trace:
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/openssl/buffering.rb:235:in `syswrite'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/openssl/buffering.rb:235:in `do_write'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/openssl/buffering.rb:249:in `write'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/net/protocol.rb:191:in `write0'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/net/protocol.rb:167:in `block in write'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/net/protocol.rb:182:in `writing'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/net/protocol.rb:166:in `write'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/net/http.rb:1756:in `send_request_with_body_stream'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/net/http.rb:1726:in `exec'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/net/http.rb:1189:in `transport_request'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/net/http.rb:1177:in `request'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/net/http/connection_pool/session.rb:64:in `request'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/net/http/connection_pool.rb:173:in `block in request'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/net/http/connection_pool.rb:194:in `session_for'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/net/http/connection_pool.rb:171:in `request'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/net/http/connection_pool/connection.rb:173:in `request'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/aws/core/http/net_http_handler.rb:66:in `handle'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/aws/core/client.rb:230:in `block in make_sync_request'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/aws/core/client.rb:266:in `retry_server_errors'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/aws/core/client.rb:226:in `make_sync_request'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/aws/core/client.rb:451:in `block (2 levels) in client_request'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/aws/core/client.rb:334:in `log_client_request'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/aws/core/client.rb:420:in `block in client_request'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/aws/core/client.rb:316:in `return_or_raise'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/aws/core/client.rb:419:in `client_request'
(eval):3:in `put_object'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/aws/s3/s3_object.rb:1649:in `write_with_put_object'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/aws/s3/s3_object.rb:600:in `write'
vendor/bundle/ruby/1.9.1/gems/paperclip-3.0.4/lib/paperclip/storage/s3.rb:313:in `block in flush_writes'
vendor/bundle/ruby/1.9.1/gems/paperclip-3.0.4/lib/paperclip/storage/s3.rb:299:in `each'
vendor/bundle/ruby/1.9.1/gems/paperclip-3.0.4/lib/paperclip/storage/s3.rb:299:in `flush_writes'
vendor/bundle/ruby/1.9.1/gems/paperclip-3.0.4/lib/paperclip/attachment.rb:200:in `save'
vendor/bundle/ruby/1.9.1/gems/paperclip-3.0.4/lib/paperclip/instance_methods.rb:17:in `block in save_attached_files'
vendor/bundle/ruby/1.9.1/gems/paperclip-3.0.4/lib/paperclip/instance_methods.rb:10:in `block in each_attachment'
vendor/bundle/ruby/1.9.1/gems/paperclip-3.0.4/lib/paperclip/instance_methods.rb:9:in `each'
vendor/bundle/ruby/1.9.1/gems/paperclip-3.0.4/lib/paperclip/instance_methods.rb:9:in `each_attachment'
vendor/bundle/ruby/1.9.1/gems/paperclip-3.0.4/lib/paperclip/instance_methods.rb:16:in `save_attached_files'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:401:in `_run_save_callbacks'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/callbacks.rb:264:in `create_or_update'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/persistence.rb:37:in `save'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/validations.rb:50:in `save'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/attribute_methods/dirty.rb:22:in `save'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/transactions.rb:241:in `block (2 levels) in save'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/transactions.rb:208:in `transaction'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/transactions.rb:293:in `with_transaction_returning_status'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/transactions.rb:241:in `block in save'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/transactions.rb:252:in `rollback_active_record_state!'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/transactions.rb:240:in `save'
app/controllers/media_controller.rb:207:in `create_for_content'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/abstract_controller/base.rb:167:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal/rendering.rb:10:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:425:in `_run__690981913__process_action__778841897__callbacks'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:386:in `_run_process_action_callbacks'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/abstract_controller/callbacks.rb:17:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal/rescue.rb:17:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/notifications.rb:53:in `block in instrument'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/notifications.rb:53:in `instrument'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal/params_wrapper.rb:201:in `process_action'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/abstract_controller/base.rb:121:in `process'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/abstract_controller/rendering.rb:45:in `process'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal.rb:193:in `dispatch'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal.rb:236:in `block in action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/routing/route_set.rb:65:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/routing/route_set.rb:65:in `dispatch'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/routing/route_set.rb:29:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-mount-0.8.3/lib/rack/mount/route_set.rb:152:in `block in call'
vendor/bundle/ruby/1.9.1/gems/rack-mount-0.8.3/lib/rack/mount/code_generation.rb:96:in `block in recognize'
vendor/bundle/ruby/1.9.1/gems/rack-mount-0.8.3/lib/rack/mount/code_generation.rb:75:in `optimized_each'
vendor/bundle/ruby/1.9.1/gems/rack-mount-0.8.3/lib/rack/mount/code_generation.rb:95:in `recognize'
vendor/bundle/ruby/1.9.1/gems/rack-mount-0.8.3/lib/rack/mount/route_set.rb:141:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/routing/route_set.rb:532:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.3.9/lib/rack/etag.rb:23:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.3.9/lib/rack/conditionalget.rb:35:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/head.rb:14:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/flash.rb:243:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.3.9/lib/rack/session/abstract/id.rb:195:in `context'
vendor/bundle/ruby/1.9.1/gems/rack-1.3.9/lib/rack/session/abstract/id.rb:190:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/cookies.rb:331:in `call'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/query_cache.rb:62:in `call'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:477:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:392:in `_run_call_callbacks'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/callbacks.rb:28:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/reloader.rb:68:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.3.9/lib/rack/sendfile.rb:101:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/rack/logger.rb:13:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.3.9/lib/rack/methodoverride.rb:24:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.3.9/lib/rack/runtime.rb:17:in `call'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.3.9/lib/rack/lock.rb:15:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/static.rb:53:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/engine.rb:456:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/rack/content_length.rb:16:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/rack/log_tailer.rb:14:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.3.9/lib/rack/handler/webrick.rb:59:in `service'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
I can't figure out why I keep getting this error. Any help would be greatly appreciated.
I was having the same problem and remembered I had recently update my aws-sdk, paperclip, cocaine gems. What I ended up doing was locking paperclip to version "3.0.4", aws-sdk to the latest version "~> 1.8.3.1", and locking cocaine at "0.3.2". This solves problems with imagemagick and amazon. I know that does not really fix the problem but it is working for me.
My app works without a problem on my localhost but I can't get it to deploy correctly with heroku. I have read through all the other questions about this here and tried many ways to resolve it but have not managed yet.
I have copied my heroku log below as I cannot work out how to solve this.
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/application.rb:136:in `initialize!'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/engine.rb:438:in `block in eager_load!'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/engine.rb:436:in `eager_load!'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `require'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/engine.rb:438:in `each'
2013-02-12T16:57:40+00:00 app[web.1]: /app/app/controllers/admin/users_controller.rb:1:in `<top (required)>': superclass mismatch for class UsersController (TypeError)
2013-02-12T16:57:40+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `block in require'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/initializable.rb:30:in `instance_exec'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/initializable.rb:30:in `run'
2013-02-12T16:57:40+00:00 app[web.1]: from script/rails:6:in `<main>'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `require'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-02-12T16:57:40+00:00 app[web.1]: from script/rails:6:in `require'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/config.ru:in `<main>'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:313:in `depend_on'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/config.ru:in `new'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/initializable.rb:54:in `run_initializers'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/initializable.rb:54:in `each'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/commands/server.rb:46:in `app'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/commands.rb:55:in `block in <top (required)>'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/commands/server.rb:70:in `start'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/commands.rb:50:in `tap'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/commands.rb:50:in `<top (required)>'
2013-02-12T16:57:41+00:00 heroku[web.1]: Process exited with status 1
2013-02-12T16:57:41+00:00 heroku[web.1]: State changed from starting to crashed
2013-02-12T16:57:41+00:00 heroku[web.1]: State changed from crashed to starting
2013-02-12T16:57:48+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 8575`
2013-02-12T16:58:03+00:00 app[web.1]: => Booting WEBrick
2013-02-12T16:58:03+00:00 app[web.1]: => Rails 3.2.10 application starting in production on http://0.0.0.0:8575
2013-02-12T16:58:03+00:00 app[web.1]: => Call with -d to detach
2013-02-12T16:58:03+00:00 app[web.1]: => Ctrl-C to shutdown server
2013-02-12T16:58:03+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-02-12T16:58:03+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-02-12T16:58:06+00:00 app[web.1]: provide a secret to prevent exploits that may be possible from crafted
2013-02-12T16:58:06+00:00 app[web.1]: cookies. This will not be supported in future versions of Rack, and
2013-02-12T16:58:06+00:00 app[web.1]: SECURITY WARNING: No secret option provided to Rack::Session::Cookie.
2013-02-12T16:58:06+00:00 app[web.1]: This poses a security threat. It is strongly recommended that you
2013-02-12T16:58:06+00:00 app[web.1]: future versions will even invalidate your existing user cookies.
2013-02-12T16:58:06+00:00 app[web.1]:
2013-02-12T16:58:06+00:00 app[web.1]: Called from: /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.10/lib/action_dispatch/middleware/session/abstract_store.rb:28:in `initialize'.
2013-02-12T16:58:06+00:00 app[web.1]:
2013-02-12T16:58:10+00:00 app[web.1]: Exiting
2013-02-12T16:58:10+00:00 app[web.1]: /app/app/controllers/admin/users_controller.rb:1:in `<top (required)>': superclass mismatch for class UsersController (TypeError)
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `require'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `block in require'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `require'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:359:in `require_or_load'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:313:in `depend_on'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:225:in `require_dependency'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/engine.rb:438:in `block in eager_load!'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/initializable.rb:30:in `instance_exec'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1
/gems/railties-3.2.10/lib/rails/initializable.rb:54:in `run_initializers'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/engine.rb:438:in `each'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/engine.rb:436:in `each'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/engine.rb:436:in `eager_load!'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/initializable.rb:30:in `run'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/application.rb:136:in `initialize!'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `require'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `block in require'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/config.ru:in `new'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/initializable.rb:54:in `each'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `require'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/config.ru:in `<main>'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/commands/server.rb:46:in `app'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/commands/server.rb:70:in `start'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/commands.rb:50:in `tap'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/commands.rb:55:in `block in <top (required)>'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/commands.rb:50:in `<top (required)>'
2013-02-12T16:58:10+00:00 app[web.1]: from script/rails:6:in `require'
2013-02-12T16:58:10+00:00 app[web.1]: from script/rails:6:in `<main>'
2013-02-12T16:58:11+00:00 heroku[web.1]: Process exited with status 1
2013-02-12T16:58:11+00:00 heroku[web.1]: State changed from starting to crashed
2013-02-12T16:58:13+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=guidelines.herokuapp.com fwd=122.149.95.138 dyno= queue= wait= connect= service= status=503 bytes=
2013-02-12T16:58:14+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=guidelines.herokuapp.com fwd=122.149.95.138 dyno= queue= wait= connect= service= status=503 bytes=
My admin usercontroller.rb is
class Admin::UserController < ApplicationController
def index
end
def new
end
end
Do you have an Admin Module or Class? I've setup similar controllers like so:
admin_controller.rb in the controllers/ folder:
class AdminController < ApplicationController
...
end
and then a sub controller for Users in controllers/admin/users_controller.rb:
class Admin::UsersController < AdminController
def index
end
def new
end
end
Then in your routes you scope or namespace appropriately:
#routes.rb
namespace :admin
resource :users
end
See "Controller Namespaces and Routing" for the specific routing you need.
Thanks - I managed to resolve this.
I had a conflict with an unnecessary user_controller.rb in an admin folder when I was using activeadmin.
All solved.
I am trying ActiveAdmin for the first time and have it working from the browser. I am not able to use Capybara to log in for integration testing, however. I have tried the fill-in-the-form method as well as stubbing the signin.
For example
it "allows user via capybara login" do
user = AdminUser.create(email: 'test#example.com', password: 'opensesame')
visit '/admin/login'
fill_in 'admin_user_email', with: user.email
fill_in 'admin_user_password', with: user.password
click_button 'Login'
end
gives the error message (full trace at end of post)
ActionView::Template::Error: wrong number of arguments (0 for 1)
/home/mike/ptbase/spec/support/request_helpers.rb:11:in `login'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/view_helpers/display_helper.rb:14:in `display_name'
I tried the stubbing method given by Joe's Notes
# spec/support/request_helpers.rb
require 'spec_helper'
include Warden::Test::Helpers
module RequestHelpers
def create_logged_in_user
user = FactoryGirl.create(:admin_user, password: 'opensesame')
login(user)
user
end
def login(user)
login_as user, scope: :user
end
end
# spec/features/patient_features_spec.rb
require 'spec_helper'
include RequestHelpers
feature "Patients" do
let(:authed_user) { create_logged_in_user }
it "should allow access" do
visit admin_dashboard_path(authed_user)
save_and_open_page
# should be good!
end
end
but that opens a page that says "You need to sign in or sign up before continuing."
I am using Rails 3.1.9, ActiveAdmin 0.5.0, and Capybara 2.0.1. I'm sure there must be an easy way to solve this ... obviously logging in is fundamental to integration testing ... but I can't seem to find it!
Full backtrace of above error:
ActionView::Template::Error: wrong number of arguments (0 for 1)
/home/mike/ptbase/spec/support/request_helpers.rb:11:in `login'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/view_helpers/display_helper.rb:14:in `display_name'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element.rb:175:in `method_missing'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/views/utility_nav.rb:21:in `build_current_user'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/views/utility_nav.rb:13:in `build'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:30:in `block in build_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/context.rb:92:in `with_current_arbre_element'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:26:in `build_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:39:in `insert_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/views/header.rb:26:in `build_utility_navigation'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/views/header.rb:13:in `build'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:30:in `block in build_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/context.rb:92:in `with_current_arbre_element'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:26:in `build_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:39:in `insert_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/views/pages/base.rb:49:in `build_header'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/views/pages/base.rb:40:in `block (2 levels) in build_page'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:31:in `block in build_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/context.rb:92:in `with_current_arbre_element'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:26:in `build_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:39:in `insert_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:18:in `div'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/views/pages/base.rb:39:in `block in build_page'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/context.rb:92:in `with_current_arbre_element'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/views/pages/base.rb:38:in `build_page'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/views/pages/base.rb:10:in `build'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:30:in `block in build_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/context.rb:92:in `with_current_arbre_element'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:26:in `build_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:39:in `insert_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/app/views/active_admin/page/index.html.arb:1:in `block in __home_mike__rvm_gems_ruby_______p____perf_gems_activeadmin_______app_views_active_admin_page_index_html_arb___526514329_111865000'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/context.rb:45:in `instance_eval'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/context.rb:45:in `initialize'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/app/views/active_admin/page/index.html.arb:1:in `new'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/app/views/active_admin/page/index.html.arb:1:in `__home_mike__rvm_gems_ruby_______p____perf_gems_activeadmin_______app_views_active_admin_page_index_html_arb___526514329_111865000'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_view/template.rb:145:in `block in render'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/notifications.rb:125:in `instrument'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_view/template.rb:143:in `render'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_view/renderer/template_renderer.rb:47:in `block (2 levels) in render_template'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/notifications.rb:123:in `block in instrument'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/notifications.rb:123:in `instrument'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_view/renderer/template_renderer.rb:46:in `block in render_template'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_view/renderer/template_renderer.rb:54:in `render_with_layout'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_view/renderer/template_renderer.rb:45:in `render_template'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_view/renderer/template_renderer.rb:18:in `render'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_view/renderer/renderer.rb:36:in `render_template'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_view/renderer/renderer.rb:17:in `render'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/abstract_controller/rendering.rb:110:in `_render_template'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/streaming.rb:225:in `_render_template'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/abstract_controller/rendering.rb:103:in `render_to_body'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/renderers.rb:28:in `render_to_body'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/abstract_controller/rendering.rb:88:in `render'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/rendering.rb:16:in `render'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/home/mike/.rvm/rubies/ruby-1.9.3-p194-perf/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activerecord-3.2.9/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/instrumentation.rb:39:in `render'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/page_controller.rb:12:in `index'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/abstract_controller/base.rb:167:in `process_action'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/rendering.rb:10:in `process_action'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:447:in `_run__1002248294__process_action__401562286__callbacks'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/rescue.rb:29:in `process_action'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/notifications.rb:123:in `block in instrument'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/notifications.rb:123:in `instrument'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activerecord-3.2.9/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/abstract_controller/base.rb:121:in `process'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/abstract_controller/rendering.rb:45:in `process'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal.rb:203:in `dispatch'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal.rb:246:in `block in action'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/routing/route_set.rb:73:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/routing/route_set.rb:36:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/routing/route_set.rb:601:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/warden-1.2.1/lib/warden/manager.rb:35:in `block in call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/warden-1.2.1/lib/warden/manager.rb:34:in `catch'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/warden-1.2.1/lib/warden/manager.rb:34:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-1.4.1/lib/rack/conditionalget.rb:25:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/head.rb:14:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/flash.rb:242:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in `context'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/cookies.rb:341:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activerecord-3.2.9/lib/active_record/query_cache.rb:64:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activerecord-3.2.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:405:in `_run__955233195__call__489842762__callbacks'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/railties-3.2.9/lib/rails/rack/logger.rb:32:in `call_app'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/railties-3.2.9/lib/rails/rack/logger.rb:16:in `block in call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/tagged_logging.rb:22:in `tagged'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/railties-3.2.9/lib/rails/rack/logger.rb:16:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/request_id.rb:22:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/static.rb:62:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/railties-3.2.9/lib/rails/engine.rb:479:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/railties-3.2.9/lib/rails/application.rb:223:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in `block in call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `each'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-test-0.6.2/lib/rack/mock_session.rb:30:in `request'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-test-0.6.2/lib/rack/test.rb:230:in `process_request'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-test-0.6.2/lib/rack/test.rb:57:in `get'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/rack_test/browser.rb:59:in `process'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/rack_test/browser.rb:38:in `block in process_and_follow_redirects'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/rack_test/browser.rb:37:in `times'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/rack_test/browser.rb:37:in `process_and_follow_redirects'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/rack_test/browser.rb:26:in `submit'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/rack_test/form.rb:64:in `submit'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/rack_test/node.rb:72:in `click'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/node/element.rb:103:in `block in click'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/node/base.rb:77:in `synchronize'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/node/element.rb:103:in `click'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/node/actions.rb:35:in `click_button'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/session.rb:338:in `block (2 levels) in <class:Session>'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/dsl.rb:51:in `block (2 levels) in <module:DSL>'
/home/mike/ptbase/spec/features/patients_features_spec.rb:19:in `block (2 levels) in <top (required)>'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/example.rb:114:in `instance_eval'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/example.rb:114:in `block in run'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/example.rb:254:in `with_around_each_hooks'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/example.rb:111:in `run'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/example_group.rb:388:in `block in run_examples'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/example_group.rb:384:in `map'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/example_group.rb:384:in `run_examples'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/example_group.rb:369:in `run'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/command_line.rb:28:in `block (2 levels) in run'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/command_line.rb:28:in `map'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/command_line.rb:28:in `block in run'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/reporter.rb:34:in `report'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/command_line.rb:25:in `run'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/runner.rb:66:in `rescue in run'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/runner.rb:62:in `run'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/runner.rb:8:in `block in autorun'
i ran into this issue few days ago, solved it by changing the setting in my spec_helper file as follow plus may you need to update the selinium and capybara versions too
Capybara.default_driver = :rack_test
Capybara.javascript_driver = :selenium
# You can also change the driver temporarily (typically in the Before/setup and After/teardown blocks):
# Use: Capybara.current_driver = :webkit # temporarily select different driver
# or use :js => true for specific test and it should use selenium by default.
# Or:
# Also see https://github.com/jnicklas/capybara#drivers
Capybara.default_wait_time = 5
Capybara.run_server = true #Whether start server when testing
Capybara.default_selector = :css #default selector , you can change to :css
OmniAuth.config.test_mode = true
When i do my first SELECT requests to my RoR app i get
"PG::Error: SSL SYSCALL error: EOF detected".
What should i do to turn off SSL in my Postgresql?
Error info:
ActiveRecord::StatementInvalid: PG::Error: SSL SYSCALL error: EOF detected : SELECT "vacancies".* FROM "vacancies" WHERE (moderated_at IS NOT null) ORDER BY id DESC LIMIT 10
Sample stack trace (show Rails)
…ases/20120808235942/app/controllers/home_controller.rb: 6:in `index'
…le/ruby/1.9.1/gems/journey-1.0.3/lib/journey/router.rb: 68:in `block in call'
…le/ruby/1.9.1/gems/journey-1.0.3/lib/journey/router.rb: 56:in `each'
…le/ruby/1.9.1/gems/journey-1.0.3/lib/journey/router.rb: 56:in `call'
…dle/ruby/1.9.1/gems/warden-1.1.1/lib/warden/manager.rb: 35:in `block in call'
…dle/ruby/1.9.1/gems/warden-1.1.1/lib/warden/manager.rb: 34:in `catch'
…dle/ruby/1.9.1/gems/warden-1.1.1/lib/warden/manager.rb: 34:in `call'
…red/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/etag.rb: 23:in `call'
…/ruby/1.9.1/gems/rack-1.4.1/lib/rack/conditionalget.rb: 25:in `call'
…/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb: 205:in `context'
…/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb: 200:in `call'
…/ruby/1.9.1/gems/rack-1.4.1/lib/rack/methodoverride.rb: 21:in `call'
…/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/runtime.rb: 17:in `call'
…red/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/lock.rb: 15:in `call'
…by/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb: 136:in `forward'
…by/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb: 245:in `fetch'
…by/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb: 185:in `lookup'
…by/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb: 66:in `call!'
…by/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb: 51:in `call'
…by/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb: 531:in `process_client'
…by/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb: 606:in `worker_loop'
…by/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb: 487:in `spawn_missing_workers'
…by/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb: 137:in `start'
I found how to fix this problem. If you use Capistrano to deploy you app add to unicorn.rb
before_fork do |server, worker|
defined?(ActiveRecord::Base) and
ActiveRecord::Base.connection.disconnect!
end
after_fork do |server, worker|
defined?(ActiveRecord::Base) and
ActiveRecord::Base.establish_connection
end