简体   繁体   中英

How to solve the [GET] “/login” routing error while building shopify app using ruby on rails?

I am getting a Routing error says " no routes matches [GET] "/login" " and also in ruby libraries. During running on a server it displays page not found and the logs for that error is Logs show [GET] route error and library error .

I have my index file at following path

views/home/index.html.erb

My code in config/routes.rb is:

Rails.application.routes.draw do
root 'home#index' 
get 'show' => 'welcomes#show'
resources :home

I am working on this app for the last 10 days with the same route and ruby version without an error but now this error came from nowhere.

I am using heroku as my intermediate server.


`2019-09-13T13:34:32.403531+00:00 app[web.1]: [1b3ee105-47d4-442e-8217-148e22394df0] vendor/bundle/ruby/2.5.0/gems/rack-2.0.7/lib/rack/runtime.rb:22:in `call'
2019-09-13T13:34:32.403536+00:00 app[web.1]: [1b3ee105-47d4-442e-8217-148e22394df0] vendor/bundle/ruby/2.5.0/gems/activesupport-5.1.7/lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
2019-09-13T13:34:32.403538+00:00 app[web.1]: [1b3ee105-47d4-442e-8217-148e22394df0] vendor/bundle/ruby/2.5.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/executor.rb:12:in `call'
2019-09-13T13:34:32.403540+00:00 app[web.1]: [1b3ee105-47d4-442e-8217-148e22394df0] vendor/bundle/ruby/2.5.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/static.rb:125:in `call'
2019-09-13T13:34:32.403542+00:00 app[web.1]: [1b3ee105-47d4-442e-8217-148e22394df0] vendor/bundle/ruby/2.5.0/gems/rack-2.0.7/lib/rack/sendfile.rb:111:in `call'
2019-09-13T13:34:32.403544+00:00 app[web.1]: [1b3ee105-47d4-442e-8217-148e22394df0] vendor/bundle/ruby/2.5.0/gems/railties-5.1.7/lib/rails/engine.rb:522:in `call'
2019-09-13T13:34:32.403547+00:00 app[web.1]: [1b3ee105-47d4-442e-8217-148e22394df0] vendor/bundle/ruby/2.5.0/gems/puma-3.12.1/lib/puma/configuration.rb:227:in `call'
2019-09-13T13:34:32.403549+00:00 app[web.1]: [1b3ee105-47d4-442e-8217-148e22394df0] vendor/bundle/ruby/2.5.0/gems/puma-3.12.1/lib/puma/server.rb:660:in `handle_request'
2019-09-13T13:34:32.403551+00:00 app[web.1]: [1b3ee105-47d4-442e-8217-148e22394df0] vendor/bundle/ruby/2.5.0/gems/puma-3.12.1/lib/puma/server.rb:474:in `process_client'
2019-09-13T13:34:32.403552+00:00 app[web.1]: [1b3ee105-47d4-442e-8217-148e22394df0] vendor/bundle/ruby/2.5.0/gems/puma-3.12.1/lib/puma/server.rb:334:in `block in run'
2019-09-13T13:34:32.403555+00:00 app[web.1]: [1b3ee105-47d4-442e-8217-148e22394df0] vendor/bundle/ruby/2.5.0/gems/puma-3.12.1/lib/puma/thread_pool.rb:135:in `block in spawn_thread'
`

Errors while loading the app:

    2019-09-16T04:29:47.627757+00:00 app[web.1]: I, [2019-09-16T04:29:47.624535 #4]  INFO -- : [9729e2c4-5417-4966-8332-2e9010d33d14] Started GET "/login?shop=dynamictask.myshopify.com" for 103.74.223.20 at 2019-09-16 04:29:47 +0000
2019-09-16T04:29:47.627784+00:00 app[web.1]: F, [2019-09-16T04:29:47.626650 #4] FATAL -- : [9729e2c4-5417-4966-8332-2e9010d33d14]
2019-09-16T04:29:47.627786+00:00 app[web.1]: F, [2019-09-16T04:29:47.626708 #4] FATAL -- : [9729e2c4-5417-4966-8332-2e9010d33d14] ActionController::RoutingError (No route matches [GET] "/login"):
2019-09-16T04:29:47.627788+00:00 app[web.1]: F, [2019-09-16T04:29:47.626741 #4] FATAL -- : [9729e2c4-5417-4966-8332-2e9010d33d14]
2019-09-16T04:29:47.627790+00:00 app[web.1]: F, [2019-09-16T04:29:47.626786 #4] FATAL -- : [9729e2c4-5417-4966-8332-2e9010d33d14] vendor/bundle/ruby/2.5.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call'
2019-09-16T04:29:47.627792+00:00 app[web.1]: [9729e2c4-5417-4966-8332-2e9010d33d14] vendor/bundle/ruby/2.5.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
2019-09-16T04:29:47.627794+00:00 app[web.1]: [9729e2c4-5417-4966-8332-2e9010d33d14] vendor/bundle/ruby/2.5.0/gems/railties-5.1.7/lib/rails/rack/logger.rb:36:in `call_app'
2019-09-16T04:29:47.627796+00:00 app[web.1]: [9729e2c4-5417-4966-8332-2e9010d33d14] vendor/bundle/ruby/2.5.0/gems/railties-5.1.7/lib/rails/rack/logger.rb:24:in `block in call'
2019-09-16T04:29:47.627797+00:00 app[web.1]: [9729e2c4-5417-4966-8332-2e9010d33d14] vendor/bundle/ruby/2.5.0/gems/activesupport-5.1.7/lib/active_support/tagged_logging.rb:69:in `block in tagged'
2019-09-16T04:29:47.627799+00:00 app[web.1]: [9729e2c4-5417-4966-8332-2e9010d33d14] vendor/bundle/ruby/2.5.0/gems/activesupport-5.1.7/lib/active_support/tagged_logging.rb:26:in `tagged'
2019-09-16T04:29:47.627800+00:00 app[web.1]: [9729e2c4-5417-4966-8332-2e9010d33d14] vendor/bundle/ruby/2.5.0/gems/activesupport-5.1.7/lib/active_support/tagged_logging.rb:69:in `tagged'
2019-09-16T04:29:47.627802+00:00 app[web.1]: [9729e2c4-5417-4966-8332-2e9010d33d14] vendor/bundle/ruby/2.5.0/gems/railties-5.1.7/lib/rails/rack/logger.rb:24:in `call'
2019-09-16T04:29:47.627803+00:00 app[web.1]: [9729e2c4-5417-4966-8332-2e9010d33d14] vendor/bundle/ruby/2.5.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
2019-09-16T04:29:47.627805+00:00 app[web.1]: [9729e2c4-5417-4966-8332-2e9010d33d14] vendor/bundle/ruby/2.5.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/request_id.rb:25:in `call'
2019-09-16T04:29:47.627806+00:00 app[web.1]: [9729e2c4-5417-4966-8332-2e9010d33d14] vendor/bundle/ruby/2.5.0/gems/rack-2.0.7/lib/rack/method_override.rb:22:in `call'
2019-09-16T04:29:47.627807+00:00 app[web.1]: [9729e2c4-5417-4966-8332-2e9010d33d14] vendor/bundle/ruby/2.5.0/gems/rack-2.0.7/lib/rack/runtime.rb:22:in `call'
2019-09-16T04:29:47.627812+00:00 app[web.1]: [9729e2c4-5417-4966-8332-2e9010d33d14] vendor/bundle/ruby/2.5.0/gems/activesupport-5.1.7/lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
2019-09-16T04:29:47.627813+00:00 app[web.1]: [9729e2c4-5417-4966-8332-2e9010d33d14] vendor/bundle/ruby/2.5.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/executor.rb:12:in `call'
2019-09-16T04:29:47.627815+00:00 app[web.1]: [9729e2c4-5417-4966-8332-2e9010d33d14] vendor/bundle/ruby/2.5.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/static.rb:125:in `call'
2019-09-16T04:29:47.627816+00:00 app[web.1]: [9729e2c4-5417-4966-8332-2e9010d33d14] vendor/bundle/ruby/2.5.0/gems/rack-2.0.7/lib/rack/sendfile.rb:111:in `call'
2019-09-16T04:29:47.627817+00:00 app[web.1]: [9729e2c4-5417-4966-8332-2e9010d33d14] vendor/bundle/ruby/2.5.0/gems/railties-5.1.7/lib/rails/engine.rb:522:in `call'
2019-09-16T04:29:47.627819+00:00 app[web.1]: [9729e2c4-5417-4966-8332-2e9010d33d14] vendor/bundle/ruby/2.5.0/gems/puma-3.12.1/lib/puma/configuration.rb:227:in `call'
2019-09-16T04:29:47.627820+00:00 app[web.1]: [9729e2c4-5417-4966-8332-2e9010d33d14] vendor/bundle/ruby/2.5.0/gems/puma-3.12.1/lib/puma/server.rb:660:in `handle_request'
2019-09-16T04:29:47.627822+00:00 app[web.1]: [9729e2c4-5417-4966-8332-2e9010d33d14] vendor/bundle/ruby/2.5.0/gems/puma-3.12.1/lib/puma/server.rb:474:in `process_client'
2019-09-16T04:29:47.627823+00:00 app[web.1]: [9729e2c4-5417-4966-8332-2e9010d33d14] vendor/bundle/ruby/2.5.0/gems/puma-3.12.1/lib/puma/server.rb:334:in `block in run'
2019-09-16T04:29:47.627825+00:00 app[web.1]: [9729e2c4-5417-4966-8332-2e9010d33d14] vendor/bundle/ruby/2.5.0/gems/puma-3.12.1/lib/puma/thread_pool.rb:135:in `block in spawn_thread'
2019-09-16T04:29:48.389553+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=obscure-ridge-95470.herokuapp.com request_id=e4cb3df9-ced9-4ae5-9461-75041afebd6f fwd="103.74.223.20" dyno=web.1 connect=1ms service=2ms status=200 bytes=143 protocol=https
2019-09-16T05:05:28.144787+00:00 heroku[web.1]: Idling
2019-09-16T05:05:28.159013+00:00 heroku[web.1]: State changed from up to down
2019-09-16T05:05:29.376624+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2019-09-16T05:05:29.384875+00:00 app[web.1]: === puma shutdown: 2019-09-16 05:05:29 +0000 ===
2019-09-16T05:05:29.384915+00:00 app[web.1]: - Goodbye!
2019-09-16T05:05:29.385066+00:00 app[web.1]: Exiting
2019-09-16T05:05:29.348475+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2019-09-16T05:05:29.464600+00:00 heroku[web.1]: Process exited with status 143

There is no any route for /login in your config/routes.rb code. I guess you should define one.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM