質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

HTML

HTMLとは、ウェブ上の文書を記述・作成するためのマークアップ言語のことです。文章の中に記述することで、文書の論理構造などを設定することができます。ハイパーリンクを設定できるハイパーテキストであり、画像・リスト・表などのデータファイルをリンクする情報に結びつけて情報を整理します。現在あるネットワーク上のほとんどのウェブページはHTMLで作成されています。

CSS

CSSはXMLやHTMLで表現した色・レイアウト・フォントなどの要素を指示する仕様の1つです。

Q&A

解決済

1回答

1240閲覧

herokuデプロイ後、特定ページだけ表示されない問題を解決したいです。

kura874638

総合スコア0

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

HTML

HTMLとは、ウェブ上の文書を記述・作成するためのマークアップ言語のことです。文章の中に記述することで、文書の論理構造などを設定することができます。ハイパーリンクを設定できるハイパーテキストであり、画像・リスト・表などのデータファイルをリンクする情報に結びつけて情報を整理します。現在あるネットワーク上のほとんどのウェブページはHTMLで作成されています。

CSS

CSSはXMLやHTMLで表現した色・レイアウト・フォントなどの要素を指示する仕様の1つです。

0グッド

0クリップ

投稿2021/03/04 09:48

前提・実現したいこと

本番環境で特定のページに遷移しようとするとエラーが出る問題を解決したいです。

ターミナルでエラーログを確認したところ、status=500と表示されており、原因が特定できずにいます。
また、開発環境では正常に表示されています。

発生している問題・エラーメッセージ

We're sorry, but something went wrong. If you are the application owner check the logs for more information.

ターミナルのエラーログ

2021-03-04T09:35:10.523010+00:00 heroku[router]: at=info method=GET path="/rooms/14" host=アプリ名 request_id=e11c5dc3-c7b1-4d9c-bc07-777b058156d2 fwd="203.139.221.75" dyno=web.1 connect=0ms service=157ms status=500 bytes=1827 protocol=https

該当のソースコード

HTML

1div class="chat-room-contents"> 2 3<div class="room-titles"> 4 <div class="agenda-content"> 5 <div class="contents-title">このルームのアジェンダ</div> 6 <div class="agenda"> 7 <%= @room.agenda %> 8 </div> 9</div> 10 11<div class="content"> 12 <div class="stance-contents"> 13 <div class="contents-title">このルームのスタンス</div> 14 <div class="stance-content"> 15 <div class="stance-title">スタンスA</div> 16 <div class="stance"> 17 <%= @room.stanceA %> 18 </div> 19 </div> 20 21 <div class="stance-content"> 22 <div class="stance-title">スタンスB</div> 23 <div class="stance"> 24 <%= @room.stanceB %> 25 </div> 26 </div> 27 </div> 28 29<% if user_signed_in? && current_user.id == @room.user_id %> 30<ul class="owner-menu"> 31 <li class="owner-menu-list"> 32 <a href="#" class="init-bottom"> 33 メニュー<%= image_tag '矢印アイコン 下4.png', size: '12x12', class: "owner-menu-icon" %> 34 </a> 35 <ul class="second-menu"> 36 <li> 37 <%= link_to room_path, method: :delete, class: "room-destroy" do %> 38 <%= image_tag 'ゴミ箱のアイコン素材.png', size: '16x16' %> 39 ルーム削除 40 <% end %> 41 </li> 42 </ul> 43 </li> 44</ul> 45<% end %> 46 47</div> 48 49</div> 50 51<div class="chat-contents"> 52 53 <div class="chat-view"> 54 55 <div class="coments"> 56 <% @posts.each do |post| %> 57 <div class="post-contents"> 58 <div class="side_a"> 59 <% if post.post_b == nil %> 60 <div class="speach_bubble_left"> 61 <%= post.post_a %> 62 <div class="user-states"> 63 <div class="user-name"> 64 name:<%= post.user.name %> 65 </div> 66 <%= post.user.gender.name %> 67 <%= post.user.prefecture.name %> 68 <%= post.user.job.name %> 69 </div> 70 </div> 71 <% end %> 72 </div> 73 <div class="side_b"> 74 <% if post.post_a == nil %> 75 <div class="speach_bubble_right"> 76 <%= post.post_b %> 77 <div class="user-states"> 78 <div class="user-name"> 79 name:<%= post.user.name %> 80 </div> 81 <%= post.user.gender.name %> 82 <%= post.user.prefecture.name %> 83 <%= post.user.job.name %> 84 </div> 85 </div> 86 <% end %> 87 </div> 88 </div> 89 <% end %> 90 </div> 91 92 </div> 93 94 <div class="chat-form"> 95 <input type="radio" name="tab_name" id="tab_a"> 96 <label class="tab_content" for="tab_a">スタンスA</label> 97 <div class="chat-content"> 98 99 <%= form_with(model: [@room, @post], local: true) do |f| %> 100 <div class="form-input"> 101 <%= f.text_area :post_a, class: 'form-comment', placeholder: 'スタンスAとしてコメント' %> 102 </div> 103 <%= f.submit 'コメントを投稿する', class: 'form-submit' %> 104 <% end %> 105 106 </div> 107 <input type="radio" name="tab_name" id="tab_b"> 108 <label class="tab_content" for="tab_b">スタンスB</label> 109 <div class="chat-content"> 110 111 <%= form_with(model: [@room, @post], local: true) do |f| %> 112 <div class="form-input"> 113 <%= f.text_area :post_b, class: 'form-comment', placeholder: 'スタンスBとしてコメント' %> 114 </div> 115 <%= f.submit 'コメントを投稿する', class: 'form-submit' %> 116 <% end %> 117 118 </div> 119 </div> 120 121</div> 122 123</div>

css

1.chat-room-contents { 2 height: 100%; 3 width: 100vw; 4 padding: 1vh 5vw 5vh 5vw; 5 background: whitesmoke; 6 flex-direction: column; 7 display: flex; 8 align-items: center; 9} 10 11.agenda-content { 12 display: flex; 13 flex-direction: column; 14 padding: 0 2vw; 15} 16 17.content { 18 display: flex; 19 justify-content: space-between; 20 padding: 0 2vw; 21} 22 23.room-titles { 24 width: 70vw; 25 display: flex; 26 flex-direction: column; 27 align-items: center; 28} 29 30.contents-title { 31 margin: 3vh 0 1vh 0; 32 font-size: 18px; 33 width: 100%; 34 text-align: left; 35} 36 37.stance-contents { 38 margin-right: 30px; 39 display: flex; 40 flex-direction: column; 41 justify-content: center; 42 align-items: center; 43 text-align: center; 44} 45 46.stance-content { 47 display: flex; 48 justify-content: space-around; 49 align-items: center; 50} 51 52.stance-title { 53 margin-right: 1vw; 54} 55 56.agenda, .stance { 57 font-size: 17px; 58 margin: 1vh 2vw; 59 padding: 1vh 1vw; 60 background: white; 61 border: black solid 1px; 62 border-radius: 4px; 63} 64 65.chat-contents { 66 margin-top: 2vh; 67 width: 60vw; 68} 69 70.chat-view { 71 height: 70vh; 72 width: 100%; 73 background: white; 74 border: black solid 1px; 75 overflow: auto; 76} 77 78.chat-form { 79 width: 100%; 80 flex-wrap: wrap; 81 display: flex; 82 justify-content: center; 83 align-items: center; 84} 85 86.post-contents { 87 display: flex; 88 justify-content: space-between; 89} 90 91.side_a, .side_b { 92 height: 100%; 93 width: 50%; 94 padding: 0 20px; 95} 96 97.side_b { 98 text-align: right; 99} 100 101.user-states { 102 margin-top: 10px; 103 font-size: 10px; 104 display: flex; 105 flex-direction: column; 106 justify-content: space-around; 107} 108 109.speach_bubble_left { 110 position: relative; 111 display: inline-block; 112 margin: 1.5em 0 1.5em 15px; 113 color: #555; 114 font-size: 20px; 115 background: rgb(247, 88, 88); 116 border: solid 3px #555; 117 box-sizing: border-box; 118 border-radius: 10px; 119 padding: 15px 10px; 120 word-break : break-all; 121 min-width: 150px; 122 max-width: 100%; 123} 124 125.speach_bubble_left:before { 126 content: ""; 127 position: absolute; 128 top: 50%; 129 left: -24px; 130 margin-top: -12px; 131 border: 12px solid transparent; 132 border-right: 12px solid rgb(247, 88, 88); 133 z-index: 2; 134} 135 136.speach_bubble_left:after { 137 content: ""; 138 position: absolute; 139 top: 50%; 140 left: -30px; 141 margin-top: -14px; 142 border: 14px solid transparent; 143 border-right: 14px solid #555; 144 z-index: 1; 145} 146 147.speach_bubble_right { 148 position: relative; 149 display: inline-block; 150 margin: 1.5em 15px 1.5em 0; 151 color: #555; 152 font-size: 20px; 153 background: aqua; 154 border: solid 3px #555; 155 box-sizing: border-box; 156 border-radius: 10px; 157 padding: 15px 10px; 158 text-align: left; 159 word-break : break-all; 160 min-width: 150px; 161 max-width: 100%; 162} 163 164.speach_bubble_right:before { 165 content: ""; 166 position: absolute; 167 top: 50%; 168 right: -24px; 169 margin-top: -12px; 170 border: 12px solid transparent; 171 border-left: 12px solid aqua; 172 z-index: 2; 173} 174 175.speach_bubble_right:after { 176 content: ""; 177 position: absolute; 178 top: 50%; 179 right: -30px; 180 margin-top: -14px; 181 border: 14px solid transparent; 182 border-left: 14px solid #555; 183 z-index: 1; 184} 185 186.tab_content { 187 height: 50px; 188 width: 50%; 189 margin-bottom: 0; 190 background-color: darkgrey; 191 line-height: 50px; 192 font-size: 15px; 193 text-align: center; 194 display: block; 195 order: -1; 196} 197 198input[name="tab_name"] { 199 display: none; 200} 201 202input:checked + .tab_content { 203 background-color: cadetblue; 204 color: aliceblue; 205} 206 207.chat-content { 208 display: none; 209 width: 100%; 210} 211 212input:checked + .tab_content + .chat-content { 213 display: block; 214} 215 216.room-destroy { 217 text-decoration: none; 218 font-size: 17px; 219 color: black; 220} 221 222.owner-menu { 223 width: 130px; 224 margin-top: 15px; 225 padding: 0; 226} 227 228.owner-menu li a { 229 text-decoration: none; 230 color: black; 231 font-size: 18px; 232} 233 234.owner-menu-icon { 235 margin-left: 3px; 236} 237 238.owner-menu li.owner-menu-list { 239 position: relative; 240 margin: 0; 241} 242 243li.owner-menu-list ul.second-menu{ 244 position: absolute; 245 top: 20px; 246 height: 25px; 247 width: 100%; 248 visibility: hidden; 249 -webkit-transition: all .2s ease; 250 transition: all .2s ease; 251} 252 253li.owner-menu-list:hover ul.second-menu { 254 top: 25px; 255 visibility: visible; 256 opacity: 1; 257} 258 259.second-menu { 260 display: flex; 261 align-items: center; 262} 263 264.form-comment { 265 font-size: 15px; 266 height: 100px; 267 width: 100%; 268 border-radius: 0; 269} 270 271.form-submit { 272 font-size: 18px; 273 height: 40px; 274 width: 100%; 275 margin: 0; 276 border-radius: 0px; 277}

試したこと

データの保存は問題なく行われていることから、HTML,CSSの記法に問題があると仮定し、見直しましたが、原因の特定には至っていません。
また、ネット上で同様のケースについて調べましたが、考えられる要因が絞りきれずにいます。

補足情報(FW/ツールのバージョンなど)

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

winterboum

2021/03/04 13:42

logはStartedから載せてください
guest

回答1

0

自己解決

アイコンとして使用していた画像に問題があったようです。
別の画像に差し替えることで自己解決しました。

投稿2021/03/05 04:57

kura874638

総合スコア0

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問