起きていること
AWSでデプロイしていますが、「We're sorry, but something went wrong.」のエラーが発生しています。
エラー分をみると「ActionController::RoutingError」と出ていますが、開発環境でrails sをした時には問題なくページが表示されており、アクションエラーである理由がわかりません。お知恵を拝借したいです。
cat production.logの結果
エラーメッセージ箇所抜粋
F, [2020-09-24T04:49:35.265972 #1471] FATAL -- : [e2288ac5-98ec-427f-b46f-dfa1d5642db4] F, [2020-09-24T04:49:35.266010 #1471] FATAL -- : [e2288ac5-98ec-427f-b46f-dfa1d5642db4] ActionController::RoutingError (No route matches [POST] "/api/jsonws/invoke"): F, [2020-09-24T04:49:35.266034 #1471] FATAL -- : [e2288ac5-98ec-427f-b46f-dfa1d5642db4] F, [2020-09-24T04:49:35.266064 #1471] FATAL -- : [e2288ac5-98ec-427f-b46f-dfa1d5642db4] actionpack (5.2.4.3) lib/action_dispatch/middleware/debug_exceptions.rb:65:in `call' F, [2020-09-24T06:30:47.415752 #1471] FATAL -- : [4a8c1e92-aa3d-4a2e-8ad5-deb9465391e1] F, [2020-09-24T06:30:47.415792 #1471] FATAL -- : [4a8c1e92-aa3d-4a2e-8ad5-deb9465391e1] ActionController::RoutingError (No route matches [GET] "/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php"): F, [2020-09-24T06:30:47.415816 #1471] FATAL -- : [4a8c1e92-aa3d-4a2e-8ad5-deb9465391e1] F, [2020-09-24T06:30:47.415862 #1471] FATAL -- : [4a8c1e92-aa3d-4a2e-8ad5-deb9465391e1] actionpack (5.2.4.3) lib/action_dispatch/middleware/debug_exceptions.rb:65:in `call' F, [2020-09-24T06:53:36.713390 #1471] FATAL -- : [d76f284c-53be-4e98-85cf-e69dac59407f] F, [2020-09-24T06:53:36.713441 #1471] FATAL -- : [d76f284c-53be-4e98-85cf-e69dac59407f] ActionController::RoutingError (No route matches [POST] "/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php"): F, [2020-09-24T06:53:36.713465 #1471] FATAL -- : [d76f284c-53be-4e98-85cf-e69dac59407f] F, [2020-09-24T06:53:36.713522 #1471] FATAL -- : [d76f284c-53be-4e98-85cf-e69dac59407f] actionpack (5.2.4.3) lib/action_dispatch/middleware/debug_exceptions.rb:65:in `call' F, [2020-09-24T09:19:04.516883 #1471] FATAL -- : [6f5fe96c-3982-4cc4-90d2-d55ef2dded86] ActionController::RoutingError (No route matches [GET] "/portal/redlion"): F, [2020-09-24T09:19:04.516906 #1471] FATAL -- : [6f5fe96c-3982-4cc4-90d2-d55ef2dded86] F, [2020-09-24T09:19:04.516946 #1471] FATAL -- : [6f5fe96c-3982-4cc4-90d2-d55ef2dded86] actionpack (5.2.4.3) lib/action_dispatch/middleware/debug_exceptions.rb:65:in `call' I, [2020-09-24T10:22:21.050904 #1471] INFO -- : [faf17e47-b316-4030-8e14-f77d0701a462] Started GET "/config/getuser?index=0" for 45.148.10.28 at 2020-09-24 10:22:21 +0000 F, [2020-09-24T10:22:21.051490 #1471] FATAL -- : [faf17e47-b316-4030-8e14-f77d0701a462] F, [2020-09-24T10:22:21.051530 #1471] FATAL -- : [faf17e47-b316-4030-8e14-f77d0701a462] ActionController::RoutingError (No route matches [GET] "/config/getuser"): F, [2020-09-24T10:22:21.051552 #1471] FATAL -- : [faf17e47-b316-4030-8e14-f77d0701a462] F, [2020-09-24T10:22:21.051590 #1471] FATAL -- : [faf17e47-b316-4030-8e14-f77d0701a462] actionpack (5.2.4.3) lib/action_dispatch/middleware/debug_exceptions.rb:65:in `call'
D, [2020-10-08T12:47:52.904492 #8782] DEBUG -- : (14.8ms) SET NAMES utf8, @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'), @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 2147483 D, [2020-10-08T12:47:52.922724 #8782] DEBUG -- : (0.1ms) SELECT GET_LOCK('4373051316486144390', 0) D, [2020-10-08T12:47:52.942735 #8782] DEBUG -- : (8.1ms) SELECT `schema_migrations`.`version` FROM `schema_migrations` ORDER BY `schema_migrations`.`version` ASC D, [2020-10-08T12:47:52.945718 #8782] DEBUG -- : ActiveRecord::InternalMetadata Load (0.2ms) SELECT `ar_internal_metadata`.* FROM `ar_internal_metadata` WHERE `ar_internal_metadata`.`key` = 'environment' LIMIT 1 D, [2020-10-08T12:47:52.950511 #8782] DEBUG -- : (0.1ms) BEGIN D, [2020-10-08T12:47:52.951501 #8782] DEBUG -- : (0.1ms) COMMIT D, [2020-10-08T12:47:52.951723 #8782] DEBUG -- : (0.1ms) SELECT RELEASE_LOCK('4373051316486144390')
config/routes.rb
Rails.application.routes.draw do root to: 'toppages#index' get 'login', to: 'sessions#new' post 'login', to: 'sessions#create' delete 'logout', to: 'sessions#destroy' get 'signup', to: 'users#new' get '/microposts/:id/comment', to: 'microposts#comment', as: 'comment' get '/microposts/:id/map', to: 'microposts#map', as: 'map' delete '/microposts/:id/comment', to: 'comments#destroy' get '/users/:id/join_ivent', to: 'users#join_ivent', as:'join_ivent' get '/users/:id/user_liking', to: 'users#user_liking', as:'user_liking' resources :users do member do get :followings get :followers get :likings get :joinings end collection do get :search end end resources :microposts do member do get :joined get :liked resources :comments, only: [:create, :destroy] end collection do get :search end end
toppages/index.html.erb
<html> <head> <meta charset="UTF-8"> <link rel= "stylesheet" href = "../assets/stylesheets/applocation.css" > </head> <body class="main_body"> <div class = "main_container"> <h1 class ="title">らぐふれ!</h1> <p class="sub_title">〜全国のラグビーイベントを探すサイト〜</p> <div class="top_button"><a href="signup" class="btn-cross">新規登録</a></div> </div> </body> </html>
toppageに関するCSS
.title{ color: #ffffff; font-size: 100px; } .sub_title{ color: #ffffff; font-size: 50px; } .main_body{ background-image: url(rugby.jpg); background-size: cover; background-color:rgba(0,0,0,0.6); background-blend-mode:darken; } .after_login_back{ background-image: url(rugby_back.001.png); background-size: cover; background-color:rgba(255,255,255,0.6); background-blend-mode:lighten; } .main_container{ text-align:center }
その他
環境情報です
Mac
Ruby 2.7.1
Ruby on Rails 5.2.2
capistrano(自動デプロイ)
carrierwave、S3(画像アップロード)
unicorn 5.4.1
Nginx
Capistrano
AWS S3(https://qiita.com/ryo-ichikawa/items/a30dc626cba1ec909d57の記事を参考に設定)