開発環境
Ruby 2.7.0
Rails 6.0.2
SQlite3 1.4
発生している問題・エラーメッセージ
We're sorry, but something went wrong. If you are the application owner check the logs for more information.
エラーログ
Started GET "/" for 127.0.0.1 at 2020-05-01 01:17:25 +0900 (0.1ms) SELECT sqlite_version(*) Processing by HomeController#index as HTML Rendering home/index.html.erb within layouts/application Rendered home/index.html.erb within layouts/application (Duration: 1.0ms | Allocations: 220) Completed 500 Internal Server Error in 55ms (ActiveRecord: 0.0ms | Allocations: 6222)
新しくでたエラーログです。
Started GET "/" for 127.0.0.1 at 2020-05-01 21:53:52 +0900 (1.0ms) SELECT sqlite_version(*) (4.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Processing by HomeController#index as HTML /Users/aaaaaa/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/messages/rotator.rb:28: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /Users/aaaaaa/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/messages/rotator.rb:6: warning: The called method `initialize' is defined here /Users/aaaaaa/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionview-6.0.2.2/lib/action_view/view_paths.rb:11: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /Users/aaaaaa/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionview-6.0.2.2/lib/action_view/lookup_context.rb:140: warning: The called method `template_exists?' is defined here /Users/aaaaaa/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionview-6.0.2.2/lib/action_view/unbound_template.rb:24: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /Users/aaaaaa/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionview-6.0.2.2/lib/action_view/template.rb:130: warning: The called method `initialize' is defined here Rendering home/index.html.erb within layouts/application Rendered home/index.html.erb within layouts/application (Duration: 1.5ms | Allocations: 361) /Users/aaaaaa/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/sprockets-4.0.0/lib/sprockets/base.rb:119: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /Users/aaaaaa/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/sprockets-4.0.0/lib/sprockets/base.rb:78: warning: The called method `find_asset' is defined here Completed 500 Internal Server Error in 1230ms (ActiveRecord: 0.0ms | Allocations: 163990)
試したこと
home/index.html.erb内のコードに記述間違いがないか確認
layouts/application.html.erb内のコードに記述間違いがないか確認
両方とも特に記述間違いはなさそうでしたが、エラーが直りません。
下記がhtmlのコードとなります。
ほかにどのように対処すればいいかわかりません。
初歩的な質問かとは思いますが、よろしくお願い致します。
homeindexhtml
1<section class="section"> 2 <article class="media"> 3 <div class="media-content"> 4 <div class="content has-text-centered"> 5 <p> 6 <strong class="is-size-1" style="font-family: cursive;">Recommend-Gourmet</strong> 7 </p> 8 </div> 9 <div class="columns is-centered"> 10 <div class="column is-5"> 11 <br> 12 <%= link_to "ログイン", new_user_session_path, class: "button is-warning is-fullwidth" %> 13 <br> 14 <%= link_to "新規登録", new_user_registration_path, class: "button is-warning is-fullwidth" %> 15 </div> 16 </div> 17 </div> 18 </article> 19 <br> 20 <div class="columns is-centered"> 21 <div class="column"> 22 <figure> 23 <div class="main-image"></div> 24 </figure> 25 </div> 26 </div> 27</section>
applicationhtml
1<!DOCTYPE html> 2<html> 3 <head> 4 <title>Recommend-Gourmet</title> 5 <%= csrf_meta_tags %> 6 <%= csp_meta_tag %> 7 8 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css" integrity="sha256-UzFD2WYH2U1dQpKDjjZK72VtPeWP50NoJjd26rnAdUI=" crossorigin="anonymous" /> 9 <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> 10 <%# <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> 11 </head> 12 13 <body> 14 <% if flash[:notice] %> 15 <div class="notification is-info"> 16 <p class="notice"><%= notice %></p> 17 </div> 18 <% end %> 19 20 <% if flash[:alert] %> 21 <div class="notification is-danger"> 22 <p class="alert"><%= alert %></p> 23 </div> 24 <% end %> 25 26 <nav class="navbar is-light"> 27 <div class="navbar-brand"> 28 <%= link_to root_path, class: "navbar-item" do %> 29 <h1 class="title is-4" style="font-family: cursive;">Recommend-Gourmet</h1> 30 <% end %> 31 <div class="navbar-burger burger" data-target="navbarExampleTransparentExample"> 32 <span></span> 33 <span></span> 34 <span></span> 35 </div> 36 </div> 37 38 <% if user_signed_in? %> 39 <div id="navbarExampleTransparentExample" class="navbar-menu"> 40 <div class="navbar-end"> 41 <div class="navbar-item"> 42 <div class="field is-grouped"> 43 <p class="control"> 44 <%= link_to recipes_path do %> 45 <i class="fas fa-book-reader fa-2x"></i> <%# 投稿一覧 %> 46 <% end %> 47 </p> 48 <p class="control"> 49 <%= link_to new_recipe_path do %> 50 <i class="far fa-edit fa-2x"></i> <%# 新規投稿 %> 51 <% end %> 52 </p> 53 <p class="control"> 54 <%= link_to users_path do %> 55 <i class="fas fa-address-book fa-2x"></i> <%# アカウント一覧 %> 56 <% end %> 57 </p> 58 <p class="control"> 59 <%= link_to user_path(current_user) do %> 60 <i class="fas fa-home fa-2x"></i> <%# マイページ %> 61 <% end %> 62 </p> 63 <p class="control"> 64 <%= link_to destroy_user_session_path, method: :delete do %> 65 <i class="fas fa-sign-out-alt fa-2x"></i> <%# ログアウト %> 66 <% end %> 67 </p> 68 </div> 69 </div> 70 </div> 71 </div> 72 <% else %> 73 <div id="navbarExampleTransparentExample" class="navbar-end"> 74 <div class="navbar-item"> 75 <div class="field is-grouped"> 76 <p class="control"> 77 <%= link_to recipes_path do %> 78 <i class="fas fa-book-reader fa-2x"></i> <%# 投稿一覧 %> 79 <% end %> 80 </p> 81 <p class="control"> 82 <%= link_to users_path do %> 83 <i class="fas fa-address-book fa-2x"></i> <%# アカウント一覧 %> 84 <% end %> 85 </p> 86 <p class="control"> 87 <%= link_to new_user_session_path do %> 88 <i class="fas fa-sign-in-alt fa-2x"></i> <%# ログイン %> 89 <% end %> 90 </p> 91 <p class="control"> 92 <%= link_to new_user_registration_path do %> 93 <i class="far fa-plus-square fa-2x"></i> <%# 新規登録 %> 94 <% end %> 95 </p> 96 </div> 97 </div> 98 </div> 99 </div> 100 <% end %> 101 102 </nav> 103 <%= yield %> 104 </body> 105</html>
回答1件
あなたの回答
tips
プレビュー