Unpermitted Parameters using Devise in Rail 4 - ruby-on-rails

Recently updated from Rails 3 to Rails 4 and am currently having issues with custom fields in Devise. I've read the documentation and many posts here on stackoverflow, but still seem to be having issues.
The error I see in the server log is the following:
Unpermitted parameters: f_name, l_name, phone
ArgumentError (wrong number of arguments (0 for 1)):
Can anyone spot the problem here?
# controllers/users/registrations_controller.rb
class Users::RegistrationsController < Devise::RegistrationsController
before_filter :configure_permitted_parameters
protected
def configure_permitted_parameters
devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(:f_name, :l_name, :phone) }
end
end
#routes.rb
devise_for :users, controllers: { registrations: "users/registrations" }
Trace:
Started POST "/users" for 127.0.0.1 at 2015-03-05 14:09:12 -0500
Started POST "/users" for 127.0.0.1 at 2015-03-05 14:09:12 -0500
Processing by Devise::RegistrationsController#create as HTML
Processing by Devise::RegistrationsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"ruHMeTinWKkFMODAO2wCRX3j3uQLYQqqcWCthB40IVU=", "user"=>{"email"=>"test#m3fin.com", "password"=>"test1234", "password_confirmation"=>"test1234"}, "commit"=>"Sign up"}
Parameters: {"utf8"=>"✓", "authenticity_token"=>"ruHMeTinWKkFMODAO2wCRX3j3uQLYQqqcWCthB40IVU=", "user"=>{"email"=>"test#m3fin.com", "password"=>"test1234", "password_confirmation"=>"test1234"}, "commit"=>"Sign up"}
Unpermitted parameters: password, password_confirmation
Unpermitted parameters: password, password_confirmation
(0.2ms) BEGIN
(0.2ms) BEGIN
User Exists (0.4ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test#m3fin.com' LIMIT 1
User Exists (0.4ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'test#m3fin.com' LIMIT 1
User Exists (0.4ms) SELECT 1 AS one FROM "users" WHERE LOWER("users"."email") = LOWER('test#m3fin.com') LIMIT 1
User Exists (0.4ms) SELECT 1 AS one FROM "users" WHERE LOWER("users"."email") = LOWER('test#m3fin.com') LIMIT 1
(0.1ms) ROLLBACK
(0.1ms) ROLLBACK
Completed 500 Internal Server Error in 22ms
Completed 500 Internal Server Error in 22ms
ArgumentError (wrong number of arguments (0 for 1)):
activerecord (4.1.6) lib/active_record/persistence.rb:227:in `update'
activesupport (4.1.6) lib/active_support/callbacks.rb:424:in `block in make_lambda'
activesupport (4.1.6) lib/active_support/callbacks.rb:402:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:402:in `block in invert_lambda'
activesupport (4.1.6) lib/active_support/callbacks.rb:175:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:175:in `block (2 levels) in conditional'
activesupport (4.1.6) lib/active_support/callbacks.rb:175:in `each'
activesupport (4.1.6) lib/active_support/callbacks.rb:175:in `all?'
activesupport (4.1.6) lib/active_support/callbacks.rb:175:in `block in conditional'
activesupport (4.1.6) lib/active_support/callbacks.rb:185:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:185:in `block in simple'
activesupport (4.1.6) lib/active_support/callbacks.rb:185:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:185:in `block in simple'
activesupport (4.1.6) lib/active_support/callbacks.rb:185:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:185:in `block in simple'
activesupport (4.1.6) lib/active_support/callbacks.rb:185:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:185:in `block in simple'
activesupport (4.1.6) lib/active_support/callbacks.rb:178:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:178:in `block in conditional'
activesupport (4.1.6) lib/active_support/callbacks.rb:178:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:178:in `block in conditional'
activesupport (4.1.6) lib/active_support/callbacks.rb:178:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:178:in `block in conditional'
activesupport (4.1.6) lib/active_support/callbacks.rb:178:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:178:in `block in conditional'
activesupport (4.1.6) lib/active_support/callbacks.rb:178:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:178:in `block in conditional'
activesupport (4.1.6) lib/active_support/callbacks.rb:86:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:86:in `run_callbacks'
activemodel (4.1.6) lib/active_model/validations.rb:376:in `run_validations!'
activemodel (4.1.6) lib/active_model/validations/callbacks.rb:111:in `block in run_validations!'
activesupport (4.1.6) lib/active_support/callbacks.rb:113:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:113:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.6) lib/active_support/callbacks.rb:166:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.6) lib/active_support/callbacks.rb:86:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:86:in `run_callbacks'
activemodel (4.1.6) lib/active_model/validations/callbacks.rb:111:in `run_validations!'
activemodel (4.1.6) lib/active_model/validations.rb:317:in `valid?'
activerecord (4.1.6) lib/active_record/validations.rb:70:in `valid?'
activerecord (4.1.6) lib/active_record/validations.rb:77:in `perform_validations'
activerecord (4.1.6) lib/active_record/validations.rb:51:in `save'
activerecord (4.1.6) lib/active_record/attribute_methods/dirty.rb:21:in `save'
activerecord (4.1.6) lib/active_record/transactions.rb:268:in `block (2 levels) in save'
activerecord (4.1.6) lib/active_record/transactions.rb:329:in `block in with_transaction_returning_status'
activerecord (4.1.6) lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'
activerecord (4.1.6) lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction'
activerecord (4.1.6) lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction'
activerecord (4.1.6) lib/active_record/transactions.rb:208:in `transaction'
activerecord (4.1.6) lib/active_record/transactions.rb:326:in `with_transaction_returning_status'
activerecord (4.1.6) lib/active_record/transactions.rb:268:in `block in save'
activerecord (4.1.6) lib/active_record/transactions.rb:283:in `rollback_active_record_state!'
activerecord (4.1.6) lib/active_record/transactions.rb:267:in `save'
devise (3.4.1) app/controllers/devise/registrations_controller.rb:19:in `create'
actionpack (4.1.6) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (4.1.6) lib/abstract_controller/base.rb:189:in `process_action'
actionpack (4.1.6) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (4.1.6) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
activesupport (4.1.6) lib/active_support/callbacks.rb:113:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:113:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
activesupport (4.1.6) lib/active_support/callbacks.rb:229:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:229:in `block in halting'
activesupport (4.1.6) lib/active_support/callbacks.rb:229:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:229:in `block in halting'
activesupport (4.1.6) lib/active_support/callbacks.rb:166:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.6) lib/active_support/callbacks.rb:166:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.6) lib/active_support/callbacks.rb:149:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
activesupport (4.1.6) lib/active_support/callbacks.rb:149:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
activesupport (4.1.6) lib/active_support/callbacks.rb:86:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:86:in `run_callbacks'
actionpack (4.1.6) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (4.1.6) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.1.6) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
activesupport (4.1.6) lib/active_support/notifications.rb:159:in `block in instrument'
activesupport (4.1.6) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.1.6) lib/active_support/notifications.rb:159:in `instrument'
actionpack (4.1.6) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.1.6) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
activerecord (4.1.6) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.1.6) lib/abstract_controller/base.rb:136:in `process'
actionview (4.1.6) lib/action_view/rendering.rb:30:in `process'
actionpack (4.1.6) lib/action_controller/metal.rb:196:in `dispatch'
actionpack (4.1.6) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.1.6) lib/action_controller/metal.rb:232:in `block in action'
actionpack (4.1.6) lib/action_dispatch/routing/route_set.rb:82:in `call'
actionpack (4.1.6) lib/action_dispatch/routing/route_set.rb:82:in `dispatch'
actionpack (4.1.6) lib/action_dispatch/routing/route_set.rb:50:in `call'
actionpack (4.1.6) lib/action_dispatch/routing/mapper.rb:45:in `call'
actionpack (4.1.6) lib/action_dispatch/journey/router.rb:73:in `block in call'
actionpack (4.1.6) lib/action_dispatch/journey/router.rb:59:in `each'
actionpack (4.1.6) lib/action_dispatch/journey/router.rb:59:in `call'
actionpack (4.1.6) lib/action_dispatch/routing/route_set.rb:678:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/rack/agent_hooks.rb:30:in `traced_call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/rack/browser_monitoring.rb:23:in `traced_call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
warden (1.2.3) lib/warden/manager.rb:34:in `catch'
warden (1.2.3) lib/warden/manager.rb:34:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
rack (1.5.2) lib/rack/etag.rb:23:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
rack (1.5.2) lib/rack/conditionalget.rb:35:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
rack (1.5.2) lib/rack/head.rb:11:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/flash.rb:254:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/cookies.rb:560:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
activerecord (4.1.6) lib/active_record/query_cache.rb:36:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
activerecord (4.1.6) lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
activerecord (4.1.6) lib/active_record/migration.rb:380:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.1.6) lib/active_support/callbacks.rb:82:in `run_callbacks'
actionpack (4.1.6) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/reloader.rb:73:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
railties (4.1.6) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.1.6) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.1.6) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.1.6) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.1.6) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.1.6) lib/rails/rack/logger.rb:20:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/request_id.rb:21:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
activesupport (4.1.6) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/static.rb:64:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
railties (4.1.6) lib/rails/engine.rb:514:in `call'
railties (4.1.6) lib/rails/application.rb:144:in `call'
railties (4.1.6) lib/rails/railtie.rb:194:in `public_send'
railties (4.1.6) lib/rails/railtie.rb:194:in `method_missing'
newrelic_rpm (3.10.0.279) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
/Users/remybartolotta/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'
/Users/remybartolotta/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'
/Users/remybartolotta/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'

please put your method in Application controller
class ApplicationController < ActionController::Base
before_action :configure_permitted_parameters, if: :devise_controller?
protected
def configure_permitted_parameters
devise_parameter_sanitizer.for(:sign_in) { |u| u.permit(:f_name, :l_name, :phone, :email, :password) }
end
end
please review devise Strong Parameter concept from https://github.com/plataformatec/devise

Related

Want to decode QR image using 'qrio', but got this error

error:
incompatible character encodings: UTF-8 and ASCII-8BIT
Extracted source (around line #48):
def decoder
session[:qr] = puts Qrio::Qr.load("public/qrpic/qr1.png").qr.text
redirect_to equipment_search_path
end
I already tried .force_encoding("ISO-8859-1").encode("UTF-8") but error still occurs. any suggestion?
image:screen capture
FullTrace :
qrio (0.0.1) lib/qrio/qr_matrix.rb:212:in `join'
qrio (0.0.1) lib/qrio/qr_matrix.rb:212:in `text'
app/controllers/equipment_controller.rb:48:in `decoder'
actionpack (4.1.8) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (4.1.8) lib/abstract_controller/base.rb:189:in `process_action'
actionpack (4.1.8) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (4.1.8) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
activesupport (4.1.8) lib/active_support/callbacks.rb:113:in `call'
activesupport (4.1.8) lib/active_support/callbacks.rb:113:in `call'
activesupport (4.1.8) lib/active_support/callbacks.rb:229:in `block in halting'
activesupport (4.1.8) lib/active_support/callbacks.rb:229:in `call'
activesupport (4.1.8) lib/active_support/callbacks.rb:229:in `block in halting'
activesupport (4.1.8) lib/active_support/callbacks.rb:166:in `call'
activesupport (4.1.8) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.8) lib/active_support/callbacks.rb:166:in `call'
activesupport (4.1.8) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.8) lib/active_support/callbacks.rb:166:in `call'
activesupport (4.1.8) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.8) lib/active_support/callbacks.rb:86:in `call'
activesupport (4.1.8) lib/active_support/callbacks.rb:86:in `run_callbacks'
actionpack (4.1.8) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (4.1.8) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.1.8) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
activesupport (4.1.8) lib/active_support/notifications.rb:159:in `block in instrument'
activesupport (4.1.8) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.1.8) lib/active_support/notifications.rb:159:in `instrument'
actionpack (4.1.8) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.1.8) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
activerecord (4.1.8) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.1.8) lib/abstract_controller/base.rb:136:in `process'
actionview (4.1.8) lib/action_view/rendering.rb:30:in `process'
actionpack (4.1.8) lib/action_controller/metal.rb:196:in `dispatch'
actionpack (4.1.8) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.1.8) lib/action_controller/metal.rb:232:in `block in action'
actionpack (4.1.8) lib/action_dispatch/routing/route_set.rb:82:in `call'
actionpack (4.1.8) lib/action_dispatch/routing/route_set.rb:82:in `dispatch'
actionpack (4.1.8) lib/action_dispatch/routing/route_set.rb:50:in `call'
actionpack (4.1.8) lib/action_dispatch/journey/router.rb:73:in `block in call'
actionpack (4.1.8) lib/action_dispatch/journey/router.rb:59:in `each'
actionpack (4.1.8) lib/action_dispatch/journey/router.rb:59:in `call'
actionpack (4.1.8) lib/action_dispatch/routing/route_set.rb:678:in `call'
warden (1.2.6) lib/warden/manager.rb:35:in `block in call'
warden (1.2.6) lib/warden/manager.rb:34:in `catch'
warden (1.2.6) lib/warden/manager.rb:34:in `call'
rack (1.5.5) lib/rack/etag.rb:23:in `call'
rack (1.5.5) lib/rack/conditionalget.rb:25:in `call'
rack (1.5.5) lib/rack/head.rb:11:in `call'
actionpack (4.1.8) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.1.8) lib/action_dispatch/middleware/flash.rb:254:in `call'
rack (1.5.5) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.5.5) lib/rack/session/abstract/id.rb:220:in `call'
app/middlewares/flash_session_cookie_middleware.rb:16:in `call'
actionpack (4.1.8) lib/action_dispatch/middleware/cookies.rb:560:in `call'
activerecord (4.1.8) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.1.8) lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
activerecord (4.1.8) lib/active_record/migration.rb:380:in `call'
actionpack (4.1.8) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.1.8) lib/active_support/callbacks.rb:82:in `run_callbacks'
actionpack (4.1.8) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.1.8) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.1.8) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
actionpack (4.1.8) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
actionpack (4.1.8) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.1.8) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.1.8) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.1.8) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.1.8) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.1.8) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.1.8) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.1.8) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.5) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.5) lib/rack/runtime.rb:17:in `call'
activesupport (4.1.8) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
rack (1.5.5) lib/rack/lock.rb:17:in `call'
actionpack (4.1.8) lib/action_dispatch/middleware/static.rb:84:in `call'
rack (1.5.5) lib/rack/sendfile.rb:112:in `call'
railties (4.1.8) lib/rails/engine.rb:514:in `call'
railties (4.1.8) lib/rails/application.rb:144:in `call'
rack (1.5.5) lib/rack/lock.rb:17:in `call'
rack (1.5.5) lib/rack/content_length.rb:14:in `call'
rack (1.5.5) lib/rack/handler/webrick.rb:60:in `service'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
Here is the "FullTrace" that I got,any suggestion?

EOFError using devise and mailcatcher on cloud9

I am trying to setup devise confirmable and testing with mailcatcher. When I try to signup I get end of file reached error with and it points to the create action of the registrations controller. I am using cloud9. I start mailcatcher with mailcatcher --http-port 8081 --ip $IP -f. I start my server with rails server -b $IP -p $PORT. My development.rb file:
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
host = "cloud9-url"
config.action_mailer.default_url_options = { host: host }
config.action_mailer.smtp_settings = { :address => host, :port => 8081 }
I also have the line config.mailer_sender = 'noreply#example.com' in my devise.rb file.
Here's the server log:
Completed 500 Internal Server Error in 30854ms
EOFError (end of file reached):
/usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/openssl/buffering.rb:182:in `sysread_nonblock'
/usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/openssl/buffering.rb:182:in `read_nonblock'
/usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/net/protocol.rb:153:in `rbuf_fill'
/usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/net/protocol.rb:134:in `readuntil'
/usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/net/protocol.rb:144:in `readline'
/usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/net/smtp.rb:945:in `recv_response'
/usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/net/smtp.rb:555:in `block in do_start'
/usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/net/smtp.rb:955:in `critical'
/usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/net/smtp.rb:555:in `do_start'
/usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/net/smtp.rb:520:in `start'
mail (2.6.3) lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!'
mail (2.6.3) lib/mail/message.rb:2141:in `do_delivery'
mail (2.6.3) lib/mail/message.rb:236:in `block in deliver'
actionmailer (4.1.7) lib/action_mailer/base.rb:527:in `block in deliver_mail'
activesupport (4.1.7) lib/active_support/notifications.rb:159:in `block in instrument'
activesupport (4.1.7) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.1.7) lib/active_support/notifications.rb:159:in `instrument'
actionmailer (4.1.7) lib/action_mailer/base.rb:525:in `deliver_mail'
mail (2.6.3) lib/mail/message.rb:236:in `deliver'
devise (3.5.2) lib/devise/models/authenticatable.rb:172:in `send_devise_notification'
devise (3.5.2) lib/devise/models/confirmable.rb:116:in `send_confirmation_instructions'
devise (3.5.2) lib/devise/models/confirmable.rb:172:in `send_on_create_confirmation_instructions'
activesupport (4.1.7) lib/active_support/callbacks.rb:424:in `block in make_lambda'
activesupport (4.1.7) lib/active_support/callbacks.rb:221:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:221:in `block in halting_and_conditional'
activesupport (4.1.7) lib/active_support/callbacks.rb:215:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
activesupport (4.1.7) lib/active_support/callbacks.rb:215:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
activesupport (4.1.7) lib/active_support/callbacks.rb:215:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
activesupport (4.1.7) lib/active_support/callbacks.rb:215:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
activesupport (4.1.7) lib/active_support/callbacks.rb:215:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
activesupport (4.1.7) lib/active_support/callbacks.rb:215:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
activesupport (4.1.7) lib/active_support/callbacks.rb:215:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
activesupport (4.1.7) lib/active_support/callbacks.rb:215:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
activesupport (4.1.7) lib/active_support/callbacks.rb:86:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:86:in `run_callbacks'
activerecord (4.1.7) lib/active_record/callbacks.rb:306:in `_create_record'
activerecord (4.1.7) lib/active_record/timestamp.rb:57:in `_create_record'
activerecord (4.1.7) lib/active_record/persistence.rb:483:in `create_or_update'
activerecord (4.1.7) lib/active_record/callbacks.rb:302:in `block in create_or_update'
activesupport (4.1.7) lib/active_support/callbacks.rb:113:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:113:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.7) lib/active_support/callbacks.rb:215:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
activesupport (4.1.7) lib/active_support/callbacks.rb:86:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:86:in `run_callbacks'
activerecord (4.1.7) lib/active_record/callbacks.rb:302:in `create_or_update'
activerecord (4.1.7) lib/active_record/persistence.rb:103:in `save'
activerecord (4.1.7) lib/active_record/validations.rb:51:in `save'
activerecord (4.1.7) lib/active_record/attribute_methods/dirty.rb:21:in `save'
activerecord (4.1.7) lib/active_record/transactions.rb:268:in `block (2 levels) in save'
activerecord (4.1.7) lib/active_record/transactions.rb:329:in `block in with_transaction_returning_status'
activerecord (4.1.7) lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'
activerecord (4.1.7) lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction'
activerecord (4.1.7) lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction'
activerecord (4.1.7) lib/active_record/transactions.rb:208:in `transaction'
activerecord (4.1.7) lib/active_record/transactions.rb:326:in `with_transaction_returning_status'
activerecord (4.1.7) lib/active_record/transactions.rb:268:in `block in save'
activerecord (4.1.7) lib/active_record/transactions.rb:283:in `rollback_active_record_state!'
activerecord (4.1.7) lib/active_record/transactions.rb:267:in `save'
devise (3.5.2) app/controllers/devise/registrations_controller.rb:17:in `create'
actionpack (4.1.7) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (4.1.7) lib/abstract_controller/base.rb:189:in `process_action'
actionpack (4.1.7) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (4.1.7) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
activesupport (4.1.7) lib/active_support/callbacks.rb:113:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:113:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
activesupport (4.1.7) lib/active_support/callbacks.rb:229:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:229:in `block in halting'
activesupport (4.1.7) lib/active_support/callbacks.rb:229:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:229:in `block in halting'
activesupport (4.1.7) lib/active_support/callbacks.rb:166:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.7) lib/active_support/callbacks.rb:166:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.7) lib/active_support/callbacks.rb:166:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.7) lib/active_support/callbacks.rb:166:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.7) lib/active_support/callbacks.rb:149:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
activesupport (4.1.7) lib/active_support/callbacks.rb:149:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
activesupport (4.1.7) lib/active_support/callbacks.rb:86:in `call'
activesupport (4.1.7) lib/active_support/callbacks.rb:86:in `run_callbacks'
actionpack (4.1.7) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (4.1.7) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.1.7) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
activesupport (4.1.7) lib/active_support/notifications.rb:159:in `block in instrument'
activesupport (4.1.7) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.1.7) lib/active_support/notifications.rb:159:in `instrument'
actionpack (4.1.7) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.1.7) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
activerecord (4.1.7) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.1.7) lib/abstract_controller/base.rb:136:in `process'
actionview (4.1.7) lib/action_view/rendering.rb:30:in `process'
actionpack (4.1.7) lib/action_controller/metal.rb:196:in `dispatch'
actionpack (4.1.7) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.1.7) lib/action_controller/metal.rb:232:in `block in action'
actionpack (4.1.7) lib/action_dispatch/routing/route_set.rb:82:in `call'
actionpack (4.1.7) lib/action_dispatch/routing/route_set.rb:82:in `dispatch'
actionpack (4.1.7) lib/action_dispatch/routing/route_set.rb:50:in `call'
actionpack (4.1.7) lib/action_dispatch/routing/mapper.rb:45:in `call'
actionpack (4.1.7) lib/action_dispatch/journey/router.rb:73:in `block in call'
actionpack (4.1.7) lib/action_dispatch/journey/router.rb:59:in `each'
actionpack (4.1.7) lib/action_dispatch/journey/router.rb:59:in `call'
actionpack (4.1.7) lib/action_dispatch/routing/route_set.rb:678:in `call'
omniauth (1.1.4) lib/omniauth/strategy.rb:184:in `call!'
omniauth (1.1.4) lib/omniauth/strategy.rb:164:in `call'
newrelic_rpm (3.6.7.152) lib/new_relic/rack/error_collector.rb:43:in `call'
newrelic_rpm (3.6.7.152) lib/new_relic/rack/agent_hooks.rb:22:in `call'
newrelic_rpm (3.6.7.152) lib/new_relic/rack/browser_monitoring.rb:16:in `call'
newrelic_rpm (3.6.7.152) lib/new_relic/rack/developer_mode.rb:28:in `call'
warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
warden (1.2.3) lib/warden/manager.rb:34:in `catch'
warden (1.2.3) lib/warden/manager.rb:34:in `call'
rack (1.5.5) lib/rack/etag.rb:23:in `call'
rack (1.5.5) lib/rack/conditionalget.rb:35:in `call'
rack (1.5.5) lib/rack/head.rb:11:in `call'
actionpack (4.1.7) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.1.7) lib/action_dispatch/middleware/flash.rb:254:in `call'
rack (1.5.5) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.5.5) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.1.7) lib/action_dispatch/middleware/cookies.rb:560:in `call'
activerecord (4.1.7) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.1.7) lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
actionpack (4.1.7) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.1.7) lib/active_support/callbacks.rb:82:in `run_callbacks'
actionpack (4.1.7) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.1.7) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.1.7) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
actionpack (4.1.7) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
actionpack (4.1.7) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.1.7) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.1.7) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.1.7) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.1.7) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.1.7) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.1.7) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.1.7) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.5) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.5) lib/rack/runtime.rb:17:in `call'
activesupport (4.1.7) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
rack (1.5.5) lib/rack/lock.rb:17:in `call'
actionpack (4.1.7) lib/action_dispatch/middleware/static.rb:84:in `call'
rack (1.5.5) lib/rack/sendfile.rb:112:in `call'
railties (4.1.7) lib/rails/engine.rb:514:in `call'
railties (4.1.7) lib/rails/application.rb:144:in `call'
rack (1.5.5) lib/rack/lock.rb:17:in `call'
rack (1.5.5) lib/rack/content_length.rb:14:in `call'
rack (1.5.5) lib/rack/handler/webrick.rb:60:in `service'
/usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
/usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
/usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.1.7/lib/action_dispatch/middleware/templates/rescues/_source.erb (0.8ms)
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.1.7/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.7ms)
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.1.7/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.3ms)
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.1.7/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (29.7ms)
Things seem to work ok when I don't use mailcatcher, meaning after I make these changes to the development.rb file:
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :test
host = 'cloud9-url'
config.action_mailer.default_url_options = { host: host }
I then run the server and signup and I no longer get any errors.
Edit: If cloud9 is https would this mean I need to change anything in my development.rb file?

undefined method `[]' for nil:NilClass on mandrill mailer

I'm trying to use the mandrill_mailer gem to control transactional email, though it's returning a undefined method [] for nil:NilClass error and highlights a line in my mailer, even if I remove this line and most of the others the problem seems to persist.
mailers/panel_mailer.rb
class PanelMailer < MandrillMailer::TemplateMailer
def blast(user, template)
humans = user.humans
mandrill_mail(
template: 'blast-1',
subject: template.subject,
to: [
{ email: "callum#hotmail.com", name: "Callum Short" }
],
vars: {
'BG_COLOUR' => "##{user.bghex}",
'LOGO' => user.logourl_url
},
template_content: {'body' => template.body},
inline_css: true,
preserve_recipients: true,
recipient_vars: {"callum#hotmail.com" => {'FULL_NAME' => "Callum Short"}}
)
end
end
Full Trace:
mandrill_mailer (0.5.1) lib/mandrill_mailer/template_mailer.rb:171:in `mandrill_mail'
mandrill_mailer (0.5.1) lib/mandrill_mailer/core_mailer.rb:278:in `call'
mandrill_mailer (0.5.1) lib/mandrill_mailer/core_mailer.rb:278:in `method_missing'
actionpack (4.1.8) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (4.1.8) lib/abstract_controller/base.rb:189:in `process_action'
actionpack (4.1.8) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (4.1.8) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
activesupport (4.1.8) lib/active_support/callbacks.rb:113:in `call'
activesupport (4.1.8) lib/active_support/callbacks.rb:113:in `call'
activesupport (4.1.8) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.8) lib/active_support/callbacks.rb:229:in `call'
activesupport (4.1.8) lib/active_support/callbacks.rb:229:in `block in halting'
activesupport (4.1.8) lib/active_support/callbacks.rb:229:in `call'
activesupport (4.1.8) lib/active_support/callbacks.rb:229:in `block in halting'
activesupport (4.1.8) lib/active_support/callbacks.rb:166:in `call'
activesupport (4.1.8) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.8) lib/active_support/callbacks.rb:166:in `call'
activesupport (4.1.8) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.8) lib/active_support/callbacks.rb:166:in `call'
activesupport (4.1.8) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.8) lib/active_support/callbacks.rb:86:in `call'
activesupport (4.1.8) lib/active_support/callbacks.rb:86:in `run_callbacks'
actionpack (4.1.8) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (4.1.8) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.1.8) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
activesupport (4.1.8) lib/active_support/notifications.rb:159:in `block in instrument'
activesupport (4.1.8) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.1.8) lib/active_support/notifications.rb:159:in `instrument'
actionpack (4.1.8) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.1.8) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
activerecord (4.1.8) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.1.8) lib/abstract_controller/base.rb:136:in `process'
actionview (4.1.8) lib/action_view/rendering.rb:30:in `process'
actionpack (4.1.8) lib/action_controller/metal.rb:196:in `dispatch'
actionpack (4.1.8) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.1.8) lib/action_controller/metal.rb:232:in `block in action'
actionpack (4.1.8) lib/action_dispatch/routing/route_set.rb:82:in `call'
actionpack (4.1.8) lib/action_dispatch/routing/route_set.rb:82:in `dispatch'
actionpack (4.1.8) lib/action_dispatch/routing/route_set.rb:50:in `call'
actionpack (4.1.8) lib/action_dispatch/journey/router.rb:73:in `block in call'
actionpack (4.1.8) lib/action_dispatch/journey/router.rb:59:in `each'
actionpack (4.1.8) lib/action_dispatch/journey/router.rb:59:in `call'
actionpack (4.1.8) lib/action_dispatch/routing/route_set.rb:678:in `call'
omniauth (1.2.2) lib/omniauth/strategy.rb:186:in `call!'
omniauth (1.2.2) lib/omniauth/strategy.rb:164:in `call'
omniauth (1.2.2) lib/omniauth/strategy.rb:186:in `call!'
omniauth (1.2.2) lib/omniauth/strategy.rb:164:in `call'
omniauth (1.2.2) lib/omniauth/strategy.rb:186:in `call!'
omniauth (1.2.2) lib/omniauth/strategy.rb:164:in `call'
warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
warden (1.2.3) lib/warden/manager.rb:34:in `catch'
warden (1.2.3) lib/warden/manager.rb:34:in `call'
rack (1.5.2) lib/rack/etag.rb:23:in `call'
rack (1.5.2) lib/rack/conditionalget.rb:35:in `call'
rack (1.5.2) lib/rack/head.rb:11:in `call'
actionpack (4.1.8) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.1.8) lib/action_dispatch/middleware/flash.rb:254:in `call'
rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.1.8) lib/action_dispatch/middleware/cookies.rb:560:in `call'
activerecord (4.1.8) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.1.8) lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
activerecord (4.1.8) lib/active_record/migration.rb:380:in `call'
actionpack (4.1.8) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.1.8) lib/active_support/callbacks.rb:82:in `run_callbacks'
actionpack (4.1.8) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.1.8) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.1.8) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
actionpack (4.1.8) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
actionpack (4.1.8) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.1.8) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.1.8) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.1.8) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.1.8) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.1.8) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.1.8) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.1.8) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.1.8) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
actionpack (4.1.8) lib/action_dispatch/middleware/static.rb:84:in `call'
rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
railties (4.1.8) lib/rails/engine.rb:514:in `call'
railties (4.1.8) lib/rails/application.rb:144:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
Log into mailchimp, go to templates, select your template and select "send to mandrill"
The error will go away :)
I will do an episode in the near future on this on http://rby.io/r/5509d6
Since are using url helpers inside mailer you should define default_url_options as a hash and specify :host option as well in development.rb or production.rb (they might differ):
config.mandrill_mailer.default_url_options = { host: 'localhost:3000' }
The error is thrown because default_url_options are nil while url helper is trying :[] method to fetch some properties.
method_missing which appears in error trace is just MandrillMailer's way to get access to Rails url helpers.

RoR - Devise Mailer - gmail refusing to send message

Currently I am working on Cloud9 and trying to create a rails app where the Devise mailer can send the reset password function and other built in mailing features.
What I think is happening, is that gmail is refusing to send the message because of the account. I even went on gmail and found the cloud9 server that was sending the request and checked "This is me" for the IP address... but it still isn't working
What I have tried:
http://support.google.com/mail/bin/answer.py?hl=en&answer=14257&p=client_login this link allows your account to receive message requests from "less secure" applications.
Changing port number - then we get a time out error rather than our current one.
tried yahoo account - similar error
also note that ports 25, 587, and 465 are blocked from Cloud9 to the outside.
Relevant files:
log/development.log:
Devise::Mailer#reset_password_instructions: processed outbound mail in 646.5ms
Sent mail to joeShmoe#gmail.com (60.6ms)
Date: Tue, 28 Apr 2015 20:32:39 +0000
From: coolEmail#gmail.com
Reply-To: coolEmail#gmail.com
To: joeShmoe#gmail.com
Message-ID: <553fee678a275_4542521a93097522#myAcct-1298669.mail>
Subject: Reset password instructions
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
<p>Hello joeShmoe#gmail.com!</p>
<p>Someone has requested a link to change your password. You can do this through the link below.</p>
<p>Change my password</p>
<p>If you didn't request this, please ignore this email.</p>
<p>Your password won't change until you access the link above and create a new one.</p>
Completed 500 Internal Server Error in 32108ms
Net::OpenTimeout (execution expired):
/usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/smtp.rb:541:in `initialize'
/usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/smtp.rb:541:in `open'
/usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/smtp.rb:541:in `tcp_socket'
/usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/smtp.rb:551:in `block in do_start'
/usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/timeout.rb:91:in `block in timeout'
/usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/timeout.rb:101:in `call'
/usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/timeout.rb:101:in `timeout'
/usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/smtp.rb:550:in `do_start'
/usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/smtp.rb:520:in `start'
mail (2.6.3) lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!'
mail (2.6.3) lib/mail/message.rb:2141:in `do_delivery'
mail (2.6.3) lib/mail/message.rb:236:in `block in deliver'
actionmailer (4.1.6) lib/action_mailer/base.rb:527:in `block in deliver_mail'
activesupport (4.1.6) lib/active_support/notifications.rb:159:in `block in instrument'
activesupport (4.1.6) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.1.6) lib/active_support/notifications.rb:159:in `instrument'
actionmailer (4.1.6) lib/action_mailer/base.rb:525:in `deliver_mail'
mail (2.6.3) lib/mail/message.rb:236:in `deliver'
devise (3.4.1) lib/devise/models/authenticatable.rb:178:in `send_devise_notification'
devise (3.4.1) lib/devise/models/recoverable.rb:99:in `send_reset_password_instructions_notification'
devise (3.4.1) lib/devise/models/recoverable.rb:49:in `send_reset_password_instructions'
devise (3.4.1) lib/devise/models/recoverable.rb:116:in `send_reset_password_instructions'
devise (3.4.1) app/controllers/devise/passwords_controller.rb:13:in `create'
actionpack (4.1.6) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (4.1.6) lib/abstract_controller/base.rb:189:in `process_action'
actionpack (4.1.6) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (4.1.6) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
activesupport (4.1.6) lib/active_support/callbacks.rb:113:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:113:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
activesupport (4.1.6) lib/active_support/callbacks.rb:149:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
activesupport (4.1.6) lib/active_support/callbacks.rb:229:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:229:in `block in halting'
activesupport (4.1.6) lib/active_support/callbacks.rb:229:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:229:in `block in halting'
activesupport (4.1.6) lib/active_support/callbacks.rb:166:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.6) lib/active_support/callbacks.rb:166:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.6) lib/active_support/callbacks.rb:166:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.6) lib/active_support/callbacks.rb:166:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.6) lib/active_support/callbacks.rb:166:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.6) lib/active_support/callbacks.rb:86:in `call'
activesupport (4.1.6) lib/active_support/callbacks.rb:86:in `run_callbacks'
actionpack (4.1.6) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (4.1.6) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.1.6) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
activesupport (4.1.6) lib/active_support/notifications.rb:159:in `block in instrument'
activesupport (4.1.6) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.1.6) lib/active_support/notifications.rb:159:in `instrument'
actionpack (4.1.6) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.1.6) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
activerecord (4.1.6) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.1.6) lib/abstract_controller/base.rb:136:in `process'
actionview (4.1.6) lib/action_view/rendering.rb:30:in `process'
actionpack (4.1.6) lib/action_controller/metal.rb:196:in `dispatch'
actionpack (4.1.6) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.1.6) lib/action_controller/metal.rb:232:in `block in action'
actionpack (4.1.6) lib/action_dispatch/routing/route_set.rb:82:in `call'
actionpack (4.1.6) lib/action_dispatch/routing/route_set.rb:82:in `dispatch'
actionpack (4.1.6) lib/action_dispatch/routing/route_set.rb:50:in `call'
actionpack (4.1.6) lib/action_dispatch/routing/mapper.rb:45:in `call'
actionpack (4.1.6) lib/action_dispatch/journey/router.rb:73:in `block in call'
actionpack (4.1.6) lib/action_dispatch/journey/router.rb:59:in `each'
actionpack (4.1.6) lib/action_dispatch/journey/router.rb:59:in `call'
actionpack (4.1.6) lib/action_dispatch/routing/route_set.rb:678:in `call'
omniauth (1.2.2) lib/omniauth/strategy.rb:186:in `call!'
omniauth (1.2.2) lib/omniauth/strategy.rb:164:in `call'
warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
warden (1.2.3) lib/warden/manager.rb:34:in `catch'
warden (1.2.3) lib/warden/manager.rb:34:in `call'
rack (1.5.2) lib/rack/etag.rb:23:in `call'
rack (1.5.2) lib/rack/conditionalget.rb:35:in `call'
rack (1.5.2) lib/rack/head.rb:11:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/flash.rb:254:in `call'
rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/cookies.rb:560:in `call'
activerecord (4.1.6) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.1.6) lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
activerecord (4.1.6) lib/active_record/migration.rb:380:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.1.6) lib/active_support/callbacks.rb:82:in `run_callbacks'
actionpack (4.1.6) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.1.6) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.1.6) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.1.6) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.1.6) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.1.6) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.1.6) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.1.6) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/static.rb:64:in `call'
rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
railties (4.1.6) lib/rails/engine.rb:514:in `call'
railties (4.1.6) lib/rails/application.rb:144:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
/usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'
/usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'
/usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'
config/environments/development.rb:
# Show full error reports and disable caching.
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: "smtp.gmail.com",
port: 587,
domain: ENV["gmail.com"],
authentication: "plain",
enable_starttls_auto: true,
user_name: ENV["coolEmail#gmail.com"],
password: ENV["coolPassword"],
openssl_verify_mode: 'none',
}

Undefined Method "apply_finder_options"

I have an undefined method error 'apply_finder_options'
_question.html.erb and where the error says it is
def self.unsolved(params)
where(solved: false).paginate(page: params[:page], order: 'created_at DESC', per_page: 3)
end
def self.search(params)
Questions Controller
def show
puts params
#question = Question.find(params[:id])
#answer = Answer.new
end
Full Error Stack Trace
activerecord (4.1.2) lib/active_record/relation/delegation.rb:136:in `method_missing'
activerecord (4.1.2) lib/active_record/relation/delegation.rb:99:in `method_missing'
will_paginate (3.0.7) lib/will_paginate/active_record.rb:168:in `paginate'
app/models/question.rb:12:in `unsolved'
app/controllers/questions_controller.rb:6:in `index'
actionpack (4.1.2) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (4.1.2) lib/abstract_controller/base.rb:189:in `process_action'
actionpack (4.1.2) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (4.1.2) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
activesupport (4.1.2) lib/active_support/callbacks.rb:113:in `call'
activesupport (4.1.2) lib/active_support/callbacks.rb:113:in `call'
activesupport (4.1.2) lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
activesupport (4.1.2) lib/active_support/callbacks.rb:229:in `call'
activesupport (4.1.2) lib/active_support/callbacks.rb:229:in `block in halting'
activesupport (4.1.2) lib/active_support/callbacks.rb:229:in `call'
activesupport (4.1.2) lib/active_support/callbacks.rb:229:in `block in halting'
activesupport (4.1.2) lib/active_support/callbacks.rb:166:in `call'
activesupport (4.1.2) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.2) lib/active_support/callbacks.rb:166:in `call'
activesupport (4.1.2) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.2) lib/active_support/callbacks.rb:166:in `call'
activesupport (4.1.2) lib/active_support/callbacks.rb:166:in `block in halting'
activesupport (4.1.2) lib/active_support/callbacks.rb:86:in `call'
activesupport (4.1.2) lib/active_support/callbacks.rb:86:in `run_callbacks'
actionpack (4.1.2) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (4.1.2) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.1.2) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
activesupport (4.1.2) lib/active_support/notifications.rb:159:in `block in instrument'
activesupport (4.1.2) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.1.2) lib/active_support/notifications.rb:159:in `instrument'
actionpack (4.1.2) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.1.2) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
activerecord (4.1.2) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.1.2) lib/abstract_controller/base.rb:136:in `process'
actionview (4.1.2) lib/action_view/rendering.rb:30:in `process'
actionpack (4.1.2) lib/action_controller/metal.rb:196:in `dispatch'
actionpack (4.1.2) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.1.2) lib/action_controller/metal.rb:232:in `block in action'
actionpack (4.1.2) lib/action_dispatch/routing/route_set.rb:82:in `call'
actionpack (4.1.2) lib/action_dispatch/routing/route_set.rb:82:in `dispatch'
actionpack (4.1.2) lib/action_dispatch/routing/route_set.rb:50:in `call'
actionpack (4.1.2) lib/action_dispatch/journey/router.rb:71:in `block in call'
actionpack (4.1.2) lib/action_dispatch/journey/router.rb:59:in `each'
actionpack (4.1.2) lib/action_dispatch/journey/router.rb:59:in `call'
actionpack (4.1.2) lib/action_dispatch/routing/route_set.rb:678:in `call'
rack (1.5.2) lib/rack/etag.rb:23:in `call'
rack (1.5.2) lib/rack/conditionalget.rb:25:in `call'
rack (1.5.2) lib/rack/head.rb:11:in `call'
actionpack (4.1.2) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.1.2) lib/action_dispatch/middleware/flash.rb:254:in `call'
rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.1.2) lib/action_dispatch/middleware/cookies.rb:560:in `call'
activerecord (4.1.2) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.1.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
activerecord (4.1.2) lib/active_record/migration.rb:380:in `call'
actionpack (4.1.2) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.1.2) lib/active_support/callbacks.rb:82:in `run_callbacks'
actionpack (4.1.2) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.1.2) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.1.2) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
actionpack (4.1.2) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
actionpack (4.1.2) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.1.2) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.1.2) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.1.2) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.1.2) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.1.2) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.1.2) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.1.2) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.1.2) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
actionpack (4.1.2) lib/action_dispatch/middleware/static.rb:64:in `call'
rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
railties (4.1.2) lib/rails/engine.rb:514:in `call'
railties (4.1.2) lib/rails/application.rb:144:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
Try changing your unsolved method to like this
def self.unsolved(params)
order('created_at DESC').where(solved: false).paginate(page: params[:page],per_page: 3)
end
Source

Resources