Linkedin Rails (403): Access to posting shares denied - ruby-on-rails

When using the Linkedin gems for ruby on rails and using the Share api call encountered an error.
(403): Access to posting shares denied
I followed the tutorial in the github omniauth-linkedin.
this is my function for the linkedin.
def self.post_status(token,secret)
client = LinkedIn::Client.new('xxxx', 'xxxx')
client.authorize_from_access(token,secret)
client.add_share({:comment => "blah"})
end
this is the full stacktrace
linkedin (1.1.0) lib/linked_in/helpers/request.rb:52:in raise_errors'
linkedin (1.1.0) lib/linked_in/helpers/request.rb:22:inpost'
linkedin (1.1.0) lib/linked_in/api/share_and_social_stream.rb:95:in add_share'
app/models/linkedin_linked.rb:21:inpost_status'
app/controllers/post_social_controller.rb:5:in post'
actionpack (4.2.6) lib/action_controller/metal/implicit_render.rb:4:insend_action'
actionpack (4.2.6) lib/abstract_controller/base.rb:198:in process_action'
actionpack (4.2.6) lib/action_controller/metal/rendering.rb:10:inprocess_action'
actionpack (4.2.6) lib/abstract_controller/callbacks.rb:20:in block in process_action'
activesupport (4.2.6) lib/active_support/callbacks.rb:117:incall'
activesupport (4.2.6) lib/active_support/callbacks.rb:117:in call'
activesupport (4.2.6) lib/active_support/callbacks.rb:555:inblock (2 levels) in compile'
activesupport (4.2.6) lib/active_support/callbacks.rb:505:in call'
activesupport (4.2.6) lib/active_support/callbacks.rb:505:incall'
activesupport (4.2.6) lib/active_support/callbacks.rb:92:in __run_callbacks__'
activesupport (4.2.6) lib/active_support/callbacks.rb:778:in_run_process_action_callbacks'
activesupport (4.2.6) lib/active_support/callbacks.rb:81:in run_callbacks'
actionpack (4.2.6) lib/abstract_controller/callbacks.rb:19:inprocess_action'
actionpack (4.2.6) lib/action_controller/metal/rescue.rb:29:in process_action'
actionpack (4.2.6) lib/action_controller/metal/instrumentation.rb:32:inblock in process_action'
activesupport (4.2.6) lib/active_support/notifications.rb:164:in block in instrument'
activesupport (4.2.6) lib/active_support/notifications/instrumenter.rb:20:ininstrument'
activesupport (4.2.6) lib/active_support/notifications.rb:164:in instrument'
actionpack (4.2.6) lib/action_controller/metal/instrumentation.rb:30:inprocess_action'
actionpack (4.2.6) lib/action_controller/metal/params_wrapper.rb:250:in process_action'
activerecord (4.2.6) lib/active_record/railties/controller_runtime.rb:18:inprocess_action'
actionpack (4.2.6) lib/abstract_controller/base.rb:137:in process'
actionview (4.2.6) lib/action_view/rendering.rb:30:inprocess'
actionpack (4.2.6) lib/action_controller/metal.rb:196:in dispatch'
actionpack (4.2.6) lib/action_controller/metal/rack_delegation.rb:13:indispatch'
actionpack (4.2.6) lib/action_controller/metal.rb:237:in block in action'
actionpack (4.2.6) lib/action_dispatch/routing/route_set.rb:74:incall'
actionpack (4.2.6) lib/action_dispatch/routing/route_set.rb:74:in dispatch'
actionpack (4.2.6) lib/action_dispatch/routing/route_set.rb:43:inserve'
actionpack (4.2.6) lib/action_dispatch/journey/router.rb:43:in block in serve'
actionpack (4.2.6) lib/action_dispatch/journey/router.rb:30:ineach'
actionpack (4.2.6) lib/action_dispatch/journey/router.rb:30:in serve'
actionpack (4.2.6) lib/action_dispatch/routing/route_set.rb:817:incall'
omniauth (1.3.1) lib/omniauth/strategy.rb:186:in call!'
omniauth (1.3.1) lib/omniauth/strategy.rb:164:incall'
omniauth (1.3.1) lib/omniauth/strategy.rb:186:in call!'
omniauth (1.3.1) lib/omniauth/strategy.rb:164:incall'
omniauth (1.3.1) lib/omniauth/strategy.rb:186:in call!'
omniauth (1.3.1) lib/omniauth/strategy.rb:164:incall'
omniauth (1.3.1) lib/omniauth/builder.rb:63:in call'
rack (1.6.4) lib/rack/etag.rb:24:incall'
rack (1.6.4) lib/rack/conditionalget.rb:38:in call'
rack (1.6.4) lib/rack/head.rb:13:incall'
actionpack (4.2.6) lib/action_dispatch/middleware/params_parser.rb:27:in call'
actionpack (4.2.6) lib/action_dispatch/middleware/flash.rb:260:incall'
rack (1.6.4) lib/rack/session/abstract/id.rb:225:in context'
rack (1.6.4) lib/rack/session/abstract/id.rb:220:incall'
actionpack (4.2.6) lib/action_dispatch/middleware/cookies.rb:560:in call'
activerecord (4.2.6) lib/active_record/query_cache.rb:36:incall'
activerecord (4.2.6) lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in call'
activerecord (4.2.6) lib/active_record/migration.rb:377:incall'
actionpack (4.2.6) lib/action_dispatch/middleware/callbacks.rb:29:in block in call'
activesupport (4.2.6) lib/active_support/callbacks.rb:88:inrun_callbacks'
activesupport (4.2.6) lib/active_support/callbacks.rb:778:in _run_call_callbacks'
activesupport (4.2.6) lib/active_support/callbacks.rb:81:inrun_callbacks'
actionpack (4.2.6) lib/action_dispatch/middleware/callbacks.rb:27:in call'
actionpack (4.2.6) lib/action_dispatch/middleware/reloader.rb:73:incall'
actionpack (4.2.6) lib/action_dispatch/middleware/remote_ip.rb:78:in call'
actionpack (4.2.6) lib/action_dispatch/middleware/debug_exceptions.rb:17:incall'
web-console (2.3.0) lib/web_console/middleware.rb:28:in block in call'
web-console (2.3.0) lib/web_console/middleware.rb:18:incatch'
web-console (2.3.0) lib/web_console/middleware.rb:18:in call'
actionpack (4.2.6) lib/action_dispatch/middleware/show_exceptions.rb:30:incall'
railties (4.2.6) lib/rails/rack/logger.rb:38:in call_app'
railties (4.2.6) lib/rails/rack/logger.rb:20:inblock in call'
activesupport (4.2.6) lib/active_support/tagged_logging.rb:68:in block in tagged'
activesupport (4.2.6) lib/active_support/tagged_logging.rb:26:intagged'
activesupport (4.2.6) lib/active_support/tagged_logging.rb:68:in tagged'
railties (4.2.6) lib/rails/rack/logger.rb:20:incall'
actionpack (4.2.6) lib/action_dispatch/middleware/request_id.rb:21:in call'
rack (1.6.4) lib/rack/methodoverride.rb:22:incall'
rack (1.6.4) lib/rack/runtime.rb:18:in call'
activesupport (4.2.6) lib/active_support/cache/strategy/local_cache_middleware.rb:28:incall'
rack (1.6.4) lib/rack/lock.rb:17:in call'
actionpack (4.2.6) lib/action_dispatch/middleware/static.rb:120:incall'
rack (1.6.4) lib/rack/sendfile.rb:113:in call'
railties (4.2.6) lib/rails/engine.rb:518:incall'
railties (4.2.6) lib/rails/application.rb:165:in call'
rack (1.6.4) lib/rack/lock.rb:17:incall'
rack (1.6.4) lib/rack/content_length.rb:15:in call'
rack (1.6.4) lib/rack/handler/webrick.rb:88:inservice'
/home/jgeliberte/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:138:in service'
/home/jgeliberte/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:94:inrun'
/home/jgeliberte/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
Hope you can help me regarding my problem.

Related

MissingHelperError in Rails::WelcomeController#index

I am getting the following error after I try creating a new Ruby app with rails new app-name-1. When I first run the server with rails s I get this:
AbstractController::Helpers::MissingHelperError in
Rails::WelcomeController#index Missing helper file
helpers/c:/users/aaa/google drive/web
apps/fake_orders_3/app/helpers/application_helper.rb_helper.rb
Rails.root: C:/users/aaa/google drive/web apps/fake-orders-3
actionpack (4.2.6) lib/abstract_controller/helpers.rb:151:in `rescue in block in modules_for_helpers' actionpack (4.2.6) lib/abstract_controller/helpers.rb:148:in `block in modules_for_helpers' actionpack (4.2.6) lib/abstract_controller/helpers.rb:144:in `map!' actionpack (4.2.6) lib/abstract_controller/helpers.rb:144:in `modules_for_helpers' actionpack (4.2.6) lib/action_controller/metal/helpers.rb:93:in `modules_for_helpers' actionpack (4.2.6)
lib/abstract_controller/helpers.rb:108:in `helper' actionpack (4.2.6) lib/action_controller/railties/helpers.rb:17:in `inherited' railties (4.2.6) lib/rails/application_controller.rb:1:in `<top (required)>' activesupport (4.2.6) lib/active_support/dependencies.rb:274:in `require' activesupport (4.2.6) lib/active_support/dependencies.rb:274:in `block in require' activesupport (4.2.6) lib/active_support/dependencies.rb:240:in `load_dependency' activesupport (4.2.6) lib/active_support/dependencies.rb:274:in `require' railties (4.2.6) lib/rails/welcome_controller.rb:1:in `<top (required)>' activesupport (4.2.6)
lib/active_support/inflector/methods.rb:263:in `const_get' activesupport (4.2.6) lib/active_support/inflector/methods.rb:263:in `block in constantize' activesupport (4.2.6) lib/active_support/inflector/methods.rb:259:in `each' activesupport (4.2.6) lib/active_support/inflector/methods.rb:259:in `inject' activesupport (4.2.6) lib/active_support/inflector/methods.rb:259:in `constantize' activesupport (4.2.6) lib/active_support/dependencies.rb:566:in `get' activesupport (4.2.6) lib/active_support/dependencies.rb:597:in `constantize' actionpack (4.2.6) lib/action_dispatch/routing/route_set.rb:70:in `controller_reference' actionpack (4.2.6) lib/action_dispatch/routing/route_set.rb:60:in `controller' actionpack (4.2.6) lib/action_dispatch/routing/route_set.rb:39:in `serve' actionpack (4.2.6)
lib/action_dispatch/journey/router.rb:43:in `block in serve' actionpack (4.2.6) lib/action_dispatch/journey/router.rb:30:in `each' actionpack (4.2.6) lib/action_dispatch/journey/router.rb:30:in `serve' actionpack (4.2.6) lib/action_dispatch/routing/route_set.rb:817:in `call' rack (1.6.4) lib/rack/etag.rb:24:in `call' rack (1.6.4) lib/rack/conditionalget.rb:25:in `call' rack (1.6.4) lib/rack/head.rb:13:in `call' actionpack (4.2.6) lib/action_dispatch/middleware/params_parser.rb:27:in `call' actionpack (4.2.6) lib/action_dispatch/middleware/flash.rb:260:in `call' rack (1.6.4) lib/rack/session/abstract/id.rb:225:in `context' rack (1.6.4) lib/rack/session/abstract/id.rb:220:in `call' actionpack (4.2.6) lib/action_dispatch/middleware/cookies.rb:560:in `call' activerecord (4.2.6) lib/active_record/query_cache.rb:36:in `call' activerecord (4.2.6) lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call' activerecord (4.2.6) lib/active_record/migration.rb:377:in `call' actionpack (4.2.6) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call' activesupport (4.2.6) lib/active_support/callbacks.rb:88:in `__run_callbacks__' activesupport (4.2.6) lib/active_support/callbacks.rb:778:in `_run_call_callbacks' activesupport (4.2.6) lib/active_support/callbacks.rb:81:in `run_callbacks' actionpack (4.2.6) lib/action_dispatch/middleware/callbacks.rb:27:in `call' actionpack (4.2.6) lib/action_dispatch/middleware/reloader.rb:73:in `call' actionpack (4.2.6) lib/action_dispatch/middleware/remote_ip.rb:78:in `call' actionpack (4.2.6) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call' web-console (2.3.0) lib/web_console/middleware.rb:28:in `block in call' web-console (2.3.0) lib/web_console/middleware.rb:18:in `catch' web-console (2.3.0) lib/web_console/middleware.rb:18:in `call' actionpack (4.2.6) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call' railties (4.2.6) lib/
rails/rack/logger.rb:38:in `call_app' railties (4.2.6) lib/rails/rack/logger.rb:20:in `block in call' activesupport (4.2.6) lib/active_support/tagged_logging.rb:68:in `block in tagged' activesupport (4.2.6) lib/active_support/tagged_logging.rb:26:in `tagged' activesupport (4.2.6) lib/active_support/tagged_logging.rb:68:in `tagged' railties (4.2.6) lib/rails/rack/logger.rb:20:in `call' actionpack (4.2.6) lib/action_dispatch/middleware/request_id.rb:21:in `call' rack (1.6.4) lib/rack/methodoverride.rb:22:in `call' rack (1.6.4) lib/rack/runtime.rb:18:in `call' activesupport (4.2.6) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' rack (1.6.4) lib/rack/lock.rb:17:in `call' actionpack (4.2.6) lib/action_dispatch/middleware/static.rb:120:in `call' rack (1.6.4) lib/rack/sendfile.rb:113:in `call' railties (4.2.6) lib/rails/engine.rb:518:in `call' railties (4.2.6) lib/rails/application.rb:165:in `call' rack (1.6.4) lib/rack/lock.rb:17:in `call' rack (1.6.4) lib/rack/content_length.rb:15:in `call' rack (1.6.4) lib/rack/handler/webrick.rb:88:in `service' C:/Ruby22/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service' C:/Ruby22/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run' C:/Ruby22/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread' This error occurred while loading the following files: rails/application_controller

unable to integrate open_id_authentication with ActionController::API

I am buidling rails application with my ApplicationController building on ActionController::API. I tried integrating open_id_authentication gem and it worked fine if my ApplicationController was built using ActionController::Base but threw error with API. I tried including middleware in following manners
Method 1. Add middleware in initilaizer
`config/initializers/openid.rb`
require 'open_id_authentication'
Rails.application.config do
config.middleware.use OpenIdAuthentication
config.after_initialize do
OpenID::Util.logger = Rails.logger
ActionController::API.send :include, OpenIdAuthentication::ControllerMethods
end
end
but got following error stack with it:
NoMethodError - undefined method `authenticate_with_open_id' for #:
app/controllers/v2/sessions_controller.rb:45:in `accounts_authentication'
app/controllers/v2/sessions_controller.rb:17:in `login'
actionpack (4.2.6) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (4.2.6) lib/abstract_controller/base.rb:198:in `process_action'
actionpack (4.2.6) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (4.2.6) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
activesupport (4.2.6) lib/active_support/callbacks.rb:117:in `call'
activesupport (4.2.6) lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
activesupport (4.2.6) lib/active_support/callbacks.rb:505:in `call'
activesupport (4.2.6) lib/active_support/callbacks.rb:92:in `__run_callbacks__'
activesupport (4.2.6) lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
activesupport (4.2.6) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.6) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (4.2.6) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.2.6) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
activesupport (4.2.6) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (4.2.6) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.2.6) lib/active_support/notifications.rb:164:in `instrument'
actionpack (4.2.6) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
activerecord (4.2.6) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.2.6) lib/abstract_controller/base.rb:137:in `process'
actionview (4.2.6) lib/action_view/rendering.rb:30:in `process'
actionpack (4.2.6) lib/action_controller/metal.rb:196:in `dispatch'
actionpack (4.2.6) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.2.6) lib/action_controller/metal.rb:237:in `block in action'
actionpack (4.2.6) lib/action_dispatch/routing/route_set.rb:74:in `dispatch'
actionpack (4.2.6) lib/action_dispatch/routing/route_set.rb:43:in `serve'
actionpack (4.2.6) lib/action_dispatch/journey/router.rb:43:in `block in serve'
actionpack (4.2.6) lib/action_dispatch/journey/router.rb:30:in `serve'
actionpack (4.2.6) lib/action_dispatch/routing/route_set.rb:817:in `call'
rack-openid (1.4.2) lib/rack/openid.rb:98:in `call'
rack (1.6.4) lib/rack/etag.rb:24:in `call'
rack (1.6.4) lib/rack/conditionalget.rb:25:in `call'
rack (1.6.4) lib/rack/head.rb:13:in `call'
actionpack (4.2.6) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.2.6) lib/action_dispatch/middleware/flash.rb:260:in `call'
rack (1.6.4) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.6.4) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.2.6) lib/action_dispatch/middleware/cookies.rb:560:in `call'
activerecord (4.2.6) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.2.6) lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
activerecord (4.2.6) lib/active_record/migration.rb:377:in `call'
actionpack (4.2.6) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.2.6) lib/active_support/callbacks.rb:88:in `__run_callbacks__'
activesupport (4.2.6) lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
activesupport (4.2.6) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.6) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.2.6) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.2.6) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
better_errors (2.1.1) lib/better_errors/middleware.rb:84:in `protected_app_call'
better_errors (2.1.1) lib/better_errors/middleware.rb:79:in `better_errors_call'
better_errors (2.1.1) lib/better_errors/middleware.rb:57:in `call'
actionpack (4.2.6) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
web-console (2.3.0) lib/web_console/middleware.rb:20:in `block in call'
web-console (2.3.0) lib/web_console/middleware.rb:18:in `call'
actionpack (4.2.6) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.2.6) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.2.6) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.2.6) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.2.6) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.2.6) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.2.6) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.2.6) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
rack (1.6.4) lib/rack/runtime.rb:18:in `call'
activesupport (4.2.6) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
rack (1.6.4) lib/rack/lock.rb:17:in `call'
actionpack (4.2.6) lib/action_dispatch/middleware/static.rb:120:in `call'
railties (4.2.6) lib/rails/engine.rb:518:in `call'
railties (4.2.6) lib/rails/application.rb:165:in `call'
rack (1.6.4) lib/rack/lock.rb:17:in `call'
rack (1.6.4) lib/rack/content_length.rb:15:in `call'
rack (1.6.4) lib/rack/handler/webrick.rb:88:in `service'
/usr/local/rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/webrick/httpserver.rb:140:in `service'
/usr/local/rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/webrick/httpserver.rb:96:in `run'
Method 2. Add middleware via config/environment/development.rb
require 'open_id_authentication'
Rails.application.configure do
config.middleware.use OpenIdAuthentication::Middleware
end
It gave the same error stack
Please help me with the solution to include middleware for open_id_authentication in ActionController::API
I checked the middlewares included using command rake middleware and I found that OpenIdAuthentication::Middleware was already included. Going through rails-api README, I added config.middleware.use Rack::MethodOverride to config/environments/development.rb.
Now, to access open_id_authentication gem methods, include it in whichever module/controller you are using via include OpenIdAuthentication::ControllerMethods as ControllerMethods module has all the methods being used.

Rails fetch outlook mail

I am building my rails application in that I am trying to fetch outlook mails using viewpointbut unable to do so.I am getting this error when I am trying to access folder .
Unknown key: version = 1
Unknown key: version = 1
undefined method `[]' for nil:NilClass
At this line: #folders = cli.folders
outlooks_controller:
require 'viewpoint'
include Viewpoint::EWS
class OutlooksController < ApplicationController
def index
endpoint = 'https://login.live.com/login.srf?wa=wsignin1.0&ct=1409066173&rver=6.1.6206.0&sa=1&ntprob=-1&wp=MBI_SSL_SHARED&wreply=https:%2F%2Fmail.live.com%2F%3Fowa%3D1%26owasuffix%3Dowa%252f&id=64855&snsc=1&cbcxt=mail'
user = 'username'
pass = 'pass'
cli = Viewpoint::EWSClient.new endpoint, user, pass
#folders = cli.folders #<---- exception here
puts "hhhhhhhhh#{cli}"
end
end
[stacktrace]
viewpoint (1.0.0) lib/ews/soap/ews_soap_response.rb:31:in `envelope'
viewpoint (1.0.0) lib/ews/soap/ews_soap_response.rb:39:in `body'
viewpoint (1.0.0) lib/ews/soap/ews_soap_response.rb:43:in `response'
viewpoint (1.0.0) lib/ews/soap/ews_soap_response.rb:47:in `response_messages'
viewpoint (1.0.0) lib/ews/soap/ews_soap_response.rb:80:in `simplify!'
viewpoint (1.0.0) lib/ews/soap/ews_soap_response.rb:27:in `initialize'
viewpoint (1.0.0) lib/ews/soap/parsers/ews_parser.rb:32:in `new'
viewpoint (1.0.0) lib/ews/soap/parsers/ews_parser.rb:32:in `parse'
viewpoint (1.0.0) lib/ews/soap/exchange_web_service.rb:221:in `parse_soap_response'
viewpoint (1.0.0) lib/ews/connection.rb:74:in `dispatch'
viewpoint (1.0.0) lib/ews/soap/exchange_web_service.rb:212:in `do_soap_request'
viewpoint (1.0.0) lib/ews/soap/exchange_data_services.rb:503:in `find_folder'
viewpoint (1.0.0) lib/ews/folder_accessors.rb:45:in `folders'
app/controllers/outlooks_controller.rb:13:in `index'
actionpack (4.2.4) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (4.2.4) lib/abstract_controller/base.rb:198:in `process_action'
actionpack (4.2.4) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (4.2.4) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
activesupport (4.2.4) lib/active_support/callbacks.rb:117:in `call'
activesupport (4.2.4) lib/active_support/callbacks.rb:117:in `call'
activesupport (4.2.4) lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
activesupport (4.2.4) lib/active_support/callbacks.rb:505:in `call'
activesupport (4.2.4) lib/active_support/callbacks.rb:505:in `call'
activesupport (4.2.4) lib/active_support/callbacks.rb:92:in `__run_callbacks__'
activesupport (4.2.4) lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
activesupport (4.2.4) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.4) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (4.2.4) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.2.4) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
activesupport (4.2.4) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (4.2.4) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.2.4) lib/active_support/notifications.rb:164:in `instrument'
actionpack (4.2.4) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.2.4) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
activerecord (4.2.4) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.2.4) lib/abstract_controller/base.rb:137:in `process'
actionview (4.2.4) lib/action_view/rendering.rb:30:in `process'
actionpack (4.2.4) lib/action_controller/metal.rb:196:in `dispatch'
actionpack (4.2.4) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.2.4) lib/action_controller/metal.rb:237:in `block in action'
actionpack (4.2.4) lib/action_dispatch/routing/route_set.rb:76:in `call'
actionpack (4.2.4) lib/action_dispatch/routing/route_set.rb:76:in `dispatch'
actionpack (4.2.4) lib/action_dispatch/routing/route_set.rb:45:in `serve'
actionpack (4.2.4) lib/action_dispatch/journey/router.rb:43:in `block in serve'
actionpack (4.2.4) lib/action_dispatch/journey/router.rb:30:in `each'
actionpack (4.2.4) lib/action_dispatch/journey/router.rb:30:in `serve'
actionpack (4.2.4) lib/action_dispatch/routing/route_set.rb:821:in `call'
rack (1.6.4) lib/rack/etag.rb:24:in `call'
rack (1.6.4) lib/rack/conditionalget.rb:25:in `call'
rack (1.6.4) lib/rack/head.rb:13:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/flash.rb:260:in `call'
rack (1.6.4) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.6.4) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/cookies.rb:560:in `call'
activerecord (4.2.4) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.2.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
activerecord (4.2.4) lib/active_record/migration.rb:377:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.2.4) lib/active_support/callbacks.rb:88:in `__run_callbacks__'
activesupport (4.2.4) lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
activesupport (4.2.4) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.4) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
web-console (2.2.1) lib/web_console/middleware.rb:39:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.2.4) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.2.4) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.2.4) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.2.4) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.2.4) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.2.4) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
rack (1.6.4) lib/rack/runtime.rb:18:in `call'
activesupport (4.2.4) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
rack (1.6.4) lib/rack/lock.rb:17:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/static.rb:116:in `call'
rack (1.6.4) lib/rack/sendfile.rb:113:in `call'
railties (4.2.4) lib/rails/engine.rb:518:in `call'
railties (4.2.4) lib/rails/application.rb:165:in `call'
rack (1.6.4) lib/rack/lock.rb:17:in `call'
rack (1.6.4) lib/rack/content_length.rb:15:in `call'
rack (1.6.4) lib/rack/handler/webrick.rb:88:in `service'
/home/techbirds/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
/home/techbirds/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
/home/techbirds/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
logging (2.0.0) lib/logging/diagnostic_context.rb:448:in `call'
logging (2.0.0) lib/logging/diagnostic_context.rb:448:in `block in create_with_logging_context'
It appears as if this is a bug in the gem itself. There's an issue opened here, where you might find more information: https://github.com/WinRb/Viewpoint/issues/166

ArgumentError in Rails::MailersController#preview in Ruby on Rails

I'm working on password reset based on the tutorial given in The Ruby on Rails Tutorial by Michael Hartl
I have got all the method, but there is an issue with password_reset method
The error is
wrong number of arguments (0 for 1)
user_mailer.rb
class UserMailer < ApplicationMailer
def account_activation(user)
#user = user
mail to: user.email, subject: "Account activation"
end
def password_reset(user)
#user = user
mail to: user.email, subject: "Password reset"
end
end
Here is the error trace:
app/mailers/user_mailer.rb:8:in `password_reset'
actionpack (4.2.5) lib/abstract_controller/base.rb:198:in `process_action'
actionpack (4.2.5) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
activesupport (4.2.5) lib/active_support/callbacks.rb:88:in `__run_callbacks__'
activesupport (4.2.5) lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
activesupport (4.2.5) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.5) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (4.2.5) lib/abstract_controller/base.rb:137:in `process'
actionview (4.2.5) lib/action_view/rendering.rb:30:in `process'
actionmailer (4.2.5) lib/action_mailer/base.rb:596:in `block in process'
activesupport (4.2.5) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (4.2.5) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.2.5) lib/active_support/notifications.rb:164:in `instrument'
actionmailer (4.2.5) lib/action_mailer/base.rb:593:in `process'
actionmailer (4.2.5) lib/action_mailer/base.rb:584:in `initialize'
actionmailer (4.2.5) lib/action_mailer/message_delivery.rb:25:in `new'
actionmailer (4.2.5) lib/action_mailer/message_delivery.rb:25:in `__getobj__'
/home/mahesh/.rbenv/versions/2.2.3/lib/ruby/2.2.0/delegate.rb:84:in `method_missing'
railties (4.2.5) lib/rails/mailers_controller.rb:62:in `block in find_preferred_part'
railties (4.2.5) lib/rails/mailers_controller.rb:61:in `each'
railties (4.2.5) lib/rails/mailers_controller.rb:61:in `find_preferred_part'
railties (4.2.5) lib/rails/mailers_controller.rb:34:in `preview'
actionpack (4.2.5) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (4.2.5) lib/abstract_controller/base.rb:198:in `process_action'
actionpack (4.2.5) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (4.2.5) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
activesupport (4.2.5) lib/active_support/callbacks.rb:117:in `call'
activesupport (4.2.5) lib/active_support/callbacks.rb:117:in `call'
activesupport (4.2.5) lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
activesupport (4.2.5) lib/active_support/callbacks.rb:505:in `call'
activesupport (4.2.5) lib/active_support/callbacks.rb:505:in `call'
activesupport (4.2.5) lib/active_support/callbacks.rb:92:in `__run_callbacks__'
activesupport (4.2.5) lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
activesupport (4.2.5) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.5) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (4.2.5) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.2.5) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
activesupport (4.2.5) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (4.2.5) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.2.5) lib/active_support/notifications.rb:164:in `instrument'
actionpack (4.2.5) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.2.5) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
activerecord (4.2.5) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.2.5) lib/abstract_controller/base.rb:137:in `process'
actionview (4.2.5) lib/action_view/rendering.rb:30:in `process'
actionpack (4.2.5) lib/action_controller/metal.rb:196:in `dispatch'
actionpack (4.2.5) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.2.5) lib/action_controller/metal.rb:237:in `block in action'
actionpack (4.2.5) lib/action_dispatch/routing/route_set.rb:76:in `call'
actionpack (4.2.5) lib/action_dispatch/routing/route_set.rb:76:in `dispatch'
actionpack (4.2.5) lib/action_dispatch/routing/route_set.rb:45:in `serve'
actionpack (4.2.5) lib/action_dispatch/journey/router.rb:43:in `block in serve'
actionpack (4.2.5) lib/action_dispatch/journey/router.rb:30:in `each'
actionpack (4.2.5) lib/action_dispatch/journey/router.rb:30:in `serve'
actionpack (4.2.5) lib/action_dispatch/routing/route_set.rb:817:in `call'
rack (1.6.4) lib/rack/etag.rb:24:in `call'
rack (1.6.4) lib/rack/conditionalget.rb:25:in `call'
rack (1.6.4) lib/rack/head.rb:13:in `call'
actionpack (4.2.5) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.2.5) lib/action_dispatch/middleware/flash.rb:260:in `call'
rack (1.6.4) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.6.4) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.2.5) lib/action_dispatch/middleware/cookies.rb:560:in `call'
activerecord (4.2.5) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.2.5) lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
activerecord (4.2.5) lib/active_record/migration.rb:377:in `call'
actionpack (4.2.5) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.2.5) lib/active_support/callbacks.rb:88:in `__run_callbacks__'
activesupport (4.2.5) lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
activesupport (4.2.5) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.5) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.2.5) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.2.5) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
web-console (2.0.0.beta3) lib/action_dispatch/debug_exceptions.rb:18:in `middleware_call'
web-console (2.0.0.beta3) lib/action_dispatch/debug_exceptions.rb:13:in `call'
actionpack (4.2.5) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.2.5) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.2.5) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.2.5) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.2.5) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.2.5) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.2.5) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.2.5) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
rack (1.6.4) lib/rack/runtime.rb:18:in `call'
activesupport (4.2.5) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
rack (1.6.4) lib/rack/lock.rb:17:in `call'
actionpack (4.2.5) lib/action_dispatch/middleware/static.rb:116:in `call'
rack (1.6.4) lib/rack/sendfile.rb:113:in `call'
railties (4.2.5) lib/rails/engine.rb:518:in `call'
railties (4.2.5) lib/rails/application.rb:165:in `call'
rack (1.6.4) lib/rack/lock.rb:17:in `call'
rack (1.6.4) lib/rack/content_length.rb:15:in `call'
rack (1.6.4) lib/rack/handler/webrick.rb:88:in `service'
/home/mahesh/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
/home/mahesh/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
/home/mahesh/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
Thanks.
Had the same problem because of my inattentiveness.
Check your 'previews' directory (and user_mailer_previews.rb) location: /test or /spec.
Mine was in /spec, but I didn't see that so manually added one more to the /test. Maybe and you did so?
If you are sending Calling the mailer from your controller, you will need to pass the user object as an argument as well.
def password_reset_action
#user = User.find_by_email(params[:email])
UserMailer.password_reset(#user).deliver
end
You will need to find the user, for whom you are resetting the password and pass that as an argument to the method in UserMailer

When login in activeadmin, I get ther error

I use gem activeadmin. Every time, when I login, I get the error.
ActionController::ActionControllerError in ActiveAdmin::Devise::SessionsController#new
raise ActionControllerError.new("Cannot redirect to nil!") unless options
on url: http://localhost:3000/admin/login
But if I go to this url http://localhost:3000/admin
activeadmin is working, but writing You are already signed in.
routes.rb
ActiveAdmin.routes(self)
#settings activeadmin
devise_for :admin_users, ActiveAdmin::Devise.config
#settings devise
devise_for :users, controllers: { sessions: "sessions", registrations: "registrations" }
get 'persons/profile'
application_controller.rb
protect_from_forgery with: :exception
before_action :configure_permitted_parameters, if: :devise_controller?
def after_sign_in_path_for(resource)
request.referer
end
def after_sign_out_path_for(resource_or_scope)
root_path
end
log
Started GET "/admin/login" for 127.0.0.1 at 2015-05-06 10:49:04 +0600
Processing by ActiveAdmin::Devise::SessionsController#new as HTML
AdminUser Load (0.3ms) SELECT "admin_users".* FROM "admin_users" WHERE "admin_users"."id" = $1 ORDER BY "admin_users"."id" ASC LIMIT 1 [["id", 2]]
Redirected to
Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.3ms)
ActionController::ActionControllerError (Cannot redirect to nil!):
actionpack (4.2.1) lib/action_controller/metal/redirecting.rb:70:in `redirect_to'
actionpack (4.2.1) lib/action_controller/metal/flash.rb:57:in `redirect_to'
actionpack (4.2.1) lib/action_controller/metal/instrumentation.rb:64:in `block in redirect_to'
activesupport (4.2.1) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (4.2.1) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.2.1) lib/active_support/notifications.rb:164:in `instrument'
actionpack (4.2.1) lib/action_controller/metal/instrumentation.rb:63:in `redirect_to'
devise (3.4.1) app/controllers/devise_controller.rb:110:in `require_no_authentication'
activesupport (4.2.1) lib/active_support/callbacks.rb:432:in `block in make_lambda'
activesupport (4.2.1) lib/active_support/callbacks.rb:145:in `call'
activesupport (4.2.1) lib/active_support/callbacks.rb:145:in `block in halting_and_conditional'
activesupport (4.2.1) lib/active_support/callbacks.rb:504:in `call'
activesupport (4.2.1) lib/active_support/callbacks.rb:504:in `block in call'
activesupport (4.2.1) lib/active_support/callbacks.rb:504:in `each'
activesupport (4.2.1) lib/active_support/callbacks.rb:504:in `call'
activesupport (4.2.1) lib/active_support/callbacks.rb:92:in `_run_callbacks'
activesupport (4.2.1) lib/active_support/callbacks.rb:776:in `_run_process_action_callbacks'
activesupport (4.2.1) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.1) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (4.2.1) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.2.1) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
activesupport (4.2.1) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (4.2.1) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.2.1) lib/active_support/notifications.rb:164:in `instrument'
actionpack (4.2.1) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.2.1) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
searchkick (0.8.7) lib/searchkick/logging.rb:107:in `process_action'
activerecord (4.2.1) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.2.1) lib/abstract_controller/base.rb:137:in `process'
actionview (4.2.1) lib/action_view/rendering.rb:30:in `process'
actionpack (4.2.1) lib/action_controller/metal.rb:196:in `dispatch'
actionpack (4.2.1) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.2.1) lib/action_controller/metal.rb:237:in `block in action'
actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:74:in `call'
actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:74:in `dispatch'
actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:43:in `serve'
actionpack (4.2.1) lib/action_dispatch/routing/mapper.rb:49:in `serve'
actionpack (4.2.1) lib/action_dispatch/journey/router.rb:43:in `block in serve'
actionpack (4.2.1) lib/action_dispatch/journey/router.rb:30:in `each'
actionpack (4.2.1) lib/action_dispatch/journey/router.rb:30:in `serve'
actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:819: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.6.0) lib/rack/etag.rb:24:in `call'
rack (1.6.0) lib/rack/conditionalget.rb:25:in `call'
rack (1.6.0) lib/rack/head.rb:13:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/flash.rb:260:in `call'
rack (1.6.0) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.6.0) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/cookies.rb:560:in `call'
activerecord (4.2.1) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.2.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:649:in `call'
activerecord (4.2.1) lib/active_record/migration.rb:378:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.2.1) lib/active_support/callbacks.rb:88:in `call'
activesupport (4.2.1) lib/active_support/callbacks.rb:88:in `_run_callbacks'
activesupport (4.2.1) lib/active_support/callbacks.rb:776:in `_run_call_callbacks'
activesupport (4.2.1) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.1) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
web-console (2.1.2) lib/web_console/middleware.rb:37:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.2.1) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.2.1) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.2.1) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.2.1) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.2.1) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.2.1) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.6.0) lib/rack/methodoverride.rb:22:in `call'
rack (1.6.0) lib/rack/runtime.rb:18:in `call'
activesupport (4.2.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
rack (1.6.0) lib/rack/lock.rb:17:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/static.rb:113:in `call'
rack (1.6.0) lib/rack/sendfile.rb:113:in `call'
railties (4.2.1) lib/rails/engine.rb:518:in `call'
railties (4.2.1) lib/rails/application.rb:164:in `call'
rack (1.6.0) lib/rack/lock.rb:17:in `call'
rack (1.6.0) lib/rack/content_length.rb:15:in `call'
rack (1.6.0) lib/rack/handler/webrick.rb:89:in `service'
/home/maratovich/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
/home/maratovich/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
/home/maratovich/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
Found many issues but not helped me
YES Solved...
First:
Method after_sign_in_path_for should be in module protected
Second in this method I added root_path || user_admin_path
Result is:
protected
def after_sign_in_path_for(resource_or_scope)
root_path || user_admin_path
end

Resources