jessenovotny / angular-devise-demo

Getting started guide/walk-through for setting up an Angular SPA with Rails API using Devise gem for user authentication
https://www.sitepoint.com/setting-up-an-angular-spa-on-rails-with-devise-and-bootstrap/
0 stars 3 forks source link

Sign up is not working #1

Open Vishruthi opened 7 years ago

Vishruthi commented 7 years ago

Hello Jesse, I followed the procedure you mentioned as is. I am not able to sign up. I am getting the following error: "POST http://localhost:3000/users.json 500 (Internal Server Error)". Opening the link is showing the error as: "Missing template application/index with {:locale=>[:en], :formats=>[:json], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :coffee, :jbuilder]}. Searched in: "C:/RailsCode/devise-app/app/views" "C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/devise-4.2.1/app/views"". Bu the file "application/index" exists in "project/app/views/application/index.html.erb". Error log: Processing by Devise::SessionsController#new as JSON Parameters: {"user"=>{}, "session"=>{"user"=>{}}} [active_model_serializers] Rendered UserSerializer with ActiveModelSerializers::Adapter::Attributes (0.0ms) Completed 201 Created in 86ms (Views: 1.2ms | ActiveRecord: 0.0ms)

Started POST "/users.json" for 127.0.0.1 at 2017-03-27 21:49:01 +0530 Processing by Devise::RegistrationsController#create as JSON Parameters: {"user"=>{"id"=>nil, "username"=>"Vishruthi", "email"=>"nvishruthi@esegna.com", "password"=>"[FILTERED]"}, "registration"=>{"user"=>{"id"=>nil, "username"=>"Vishruthi", "email"=>"nvishruthi@esegna.com", "password"=>"[FILTERED]"}}} Unpermitted parameter: id Completed 500 Internal Server Error in 20ms (ActiveRecord: 0.0ms)

LoadError (cannot load such file -- bcrypt_ext):

activesupport (5.0.2) lib/active_support/dependencies.rb:293:in require' activesupport (5.0.2) lib/active_support/dependencies.rb:293:inblock in require' activesupport (5.0.2) lib/active_support/dependencies.rb:259:in load_dependency' activesupport (5.0.2) lib/active_support/dependencies.rb:293:inrequire' bcrypt-3.1.11-x64 (mingw32) lib/bcrypt.rb:16:in rescue in <top (required)>' bcrypt-3.1.11-x64 (mingw32) lib/bcrypt.rb:12:in<top (required)>' activesupport (5.0.2) lib/active_support/dependencies.rb:293:in require' activesupport (5.0.2) lib/active_support/dependencies.rb:293:inblock in require' activesupport (5.0.2) lib/active_support/dependencies.rb:259:in load_dependency' activesupport (5.0.2) lib/active_support/dependencies.rb:293:inrequire' devise (4.2.1) lib/devise/encryptor.rb:1:in <top (required)>' activesupport (5.0.2) lib/active_support/dependencies.rb:293:inrequire' activesupport (5.0.2) lib/active_support/dependencies.rb:293:in block in require' activesupport (5.0.2) lib/active_support/dependencies.rb:259:inload_dependency' activesupport (5.0.2) lib/active_support/dependencies.rb:293:in require' devise (4.2.1) lib/devise/models/database_authenticatable.rb:158:inpassword_digest' devise (4.2.1) lib/devise/models/database_authenticatable.rb:45:in password=' activemodel (5.0.2) lib/active_model/attribute_assignment.rb:46:inpublic_send' activemodel (5.0.2) lib/active_model/attribute_assignment.rb:46:in _assign_attribute' activemodel (5.0.2) lib/active_model/attribute_assignment.rb:40:inblock in _assign_attributes' activemodel (5.0.2) lib/active_model/attribute_assignment.rb:39:in each' activemodel (5.0.2) lib/active_model/attribute_assignment.rb:39:in_assign_attributes' activerecord (5.0.2) lib/active_record/attribute_assignment.rb:26:in _assign_attributes' activemodel (5.0.2) lib/active_model/attribute_assignment.rb:33:inassign_attributes' activerecord (5.0.2) lib/active_record/core.rb:319:in initialize' activerecord (5.0.2) lib/active_record/inheritance.rb:65:innew' activerecord (5.0.2) lib/active_record/inheritance.rb:65:in new' devise (4.2.1) lib/devise/models/registerable.rb:20:innew_with_session' devise (4.2.1) app/controllers/devise/registrations_controller.rb:101:in build_resource' devise (4.2.1) app/controllers/devise/registrations_controller.rb:15:increate' actionpack (5.0.2) lib/action_controller/metal/basic_implicit_render.rb:4:in send_action' actionpack (5.0.2) lib/abstract_controller/base.rb:188:inprocess_action' actionpack (5.0.2) lib/action_controller/metal/rendering.rb:30:in process_action' actionpack (5.0.2) lib/abstract_controller/callbacks.rb:20:inblock in process_action' activesupport (5.0.2) lib/active_support/callbacks.rb:126:in call' activesupport (5.0.2) lib/active_support/callbacks.rb:506:inblock (2 levels) in compile' activesupport (5.0.2) lib/active_support/callbacks.rb:455:in call' activesupport (5.0.2) lib/active_support/callbacks.rb:101:inrun_callbacks' activesupport (5.0.2) lib/active_support/callbacks.rb:750:in _run_process_action_callbacks' activesupport (5.0.2) lib/active_support/callbacks.rb:90:inrun_callbacks' actionpack (5.0.2) lib/abstract_controller/callbacks.rb:19:in process_action' actionpack (5.0.2) lib/action_controller/metal/rescue.rb:20:inprocess_action' actionpack (5.0.2) lib/action_controller/metal/instrumentation.rb:32:in block in process_action' activesupport (5.0.2) lib/active_support/notifications.rb:164:inblock in instrument' activesupport (5.0.2) lib/active_support/notifications/instrumenter.rb:21:in instrument' activesupport (5.0.2) lib/active_support/notifications.rb:164:ininstrument' actionpack (5.0.2) lib/action_controller/metal/instrumentation.rb:30:in process_action' actionpack (5.0.2) lib/action_controller/metal/params_wrapper.rb:248:inprocess_action' activerecord (5.0.2) lib/active_record/railties/controller_runtime.rb:18:in process_action' actionpack (5.0.2) lib/abstract_controller/base.rb:126:inprocess' actionview (5.0.2) lib/action_view/rendering.rb:30:in process' actionpack (5.0.2) lib/action_controller/metal.rb:190:indispatch' actionpack (5.0.2) lib/action_controller/metal.rb:262:in dispatch' actionpack (5.0.2) lib/action_dispatch/routing/route_set.rb:50:indispatch' actionpack (5.0.2) lib/action_dispatch/routing/route_set.rb:32:in serve' actionpack (5.0.2) lib/action_dispatch/routing/mapper.rb:16:inblock in ' actionpack (5.0.2) lib/action_dispatch/routing/mapper.rb:46:in serve' actionpack (5.0.2) lib/action_dispatch/journey/router.rb:39:inblock in serve' actionpack (5.0.2) lib/action_dispatch/journey/router.rb:26:in each' actionpack (5.0.2) lib/action_dispatch/journey/router.rb:26:inserve' actionpack (5.0.2) lib/action_dispatch/routing/route_set.rb:725:in call' warden (1.2.7) lib/warden/manager.rb:36:inblock in call' warden (1.2.7) lib/warden/manager.rb:35:in catch' warden (1.2.7) lib/warden/manager.rb:35:incall' rack (2.0.1) lib/rack/etag.rb:25:in call' rack (2.0.1) lib/rack/conditional_get.rb:38:incall' rack (2.0.1) lib/rack/head.rb:12:in call' rack (2.0.1) lib/rack/session/abstract/id.rb:222:incontext' rack (2.0.1) lib/rack/session/abstract/id.rb:216:in call' actionpack (5.0.2) lib/action_dispatch/middleware/cookies.rb:613:incall' activerecord (5.0.2) lib/active_record/migration.rb:553:in call' actionpack (5.0.2) lib/action_dispatch/middleware/callbacks.rb:38:inblock in call' activesupport (5.0.2) lib/active_support/callbacks.rb:97:in `run_callbacks' activesupport (5.0.2) lib/active_support/callbacks.rb:750:in _run_call_callbacks' activesupport (5.0.2) lib/active_support/callbacks.rb:90:inrun_callbacks' actionpack (5.0.2) lib/action_dispatch/middleware/callbacks.rb:36:in call' actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:incall' actionpack (5.0.2) lib/action_dispatch/middleware/remote_ip.rb:79:in call' actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:49:incall' web-console (3.4.0) lib/web_console/middleware.rb:135:in call_app' web-console (3.4.0) lib/web_console/middleware.rb:28:inblock in call' web-console (3.4.0) lib/web_console/middleware.rb:18:in catch' web-console (3.4.0) lib/web_console/middleware.rb:18:incall' actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in call' railties (5.0.2) lib/rails/rack/logger.rb:36:incall_app' railties (5.0.2) lib/rails/rack/logger.rb:24:in block in call' activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:inblock in tagged' activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in tagged' activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:intagged' railties (5.0.2) lib/rails/rack/logger.rb:24:in call' sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:incall' actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in call' rack (2.0.1) lib/rack/method_override.rb:22:incall' rack (2.0.1) lib/rack/runtime.rb:22:in call' activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:incall' actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in call' actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:incall' rack (2.0.1) lib/rack/sendfile.rb:111:in call' railties (5.0.2) lib/rails/engine.rb:522:incall' puma (3.8.2) lib/puma/configuration.rb:224:in call' puma (3.8.2) lib/puma/server.rb:600:inhandle_request' puma (3.8.2) lib/puma/server.rb:435:in process_client' puma (3.8.2) lib/puma/server.rb:299:inblock in run' puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread' Rendering C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout Rendering C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb Rendered C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (5.0ms) Rendering C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb Rendered C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.0ms) Rendering C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb Rendered C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.0ms) Rendered C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (601.0ms) Started GET "/users.json" for 127.0.0.1 at 2017-03-27 21:49:23 +0530 Processing by UsersController#index as JSON Completed 500 Internal Server Error in 25ms (ActiveRecord: 0.0ms)

Please help to get out this issue.

jessenovotny commented 7 years ago

Interesting... I just cloned the repo and it's working locally. Either there's something in the code I didn't include in the walkthrough or a step was missed. Did you watch the youtube walkthrough linked in my Readme? I know it works at the end of that video. Perhaps you'll see what's going wrong after watching.

One thing that jumps out at me in your error is this:

Unpermitted parameter: id
Completed 500 Internal Server Error in 20ms (ActiveRecord: 0.0ms)

LoadError (cannot load such file -- bcrypt_ext):
Vishruthi commented 7 years ago

Yes, I watched the video. In fact, I first followed the video and then reconfirmed the steps here. Let me also clone the repo and test locally.

Thanks & Regards,


Vishruthi

On Mon, Mar 27, 2017 at 11:02 PM, Jesse Novotny notifications@github.com wrote:

Interesting... I just cloned the repo and it's working locally. Either there's something in the code I didn't include in the walkthrough or a step was missed. Did you watch the youtube walkthrough linked in my Readme? I know it works at the end of that video. Perhaps you'll see what's going wrong after watching.

One thing that jumps out at me in your error is this:

Unpermitted parameter: id Completed 500 Internal Server Error in 20ms (ActiveRecord: 0.0ms)

LoadError (cannot load such file -- bcrypt_ext):

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jessenovotny/angular-devise-demo/issues/1#issuecomment-289525621, or mute the thread https://github.com/notifications/unsubscribe-auth/ARbjrODUtm1pt787CM0eBcnyc76oXwG9ks5rp_KcgaJpZM4MqglN .

jessenovotny commented 7 years ago

Can you create a repo with what you have and send me a link so I can replicate your error locally?