質問編集履歴
1
文法の修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
お世話になっております。
|
4
4
|
|
5
5
|
`Rails`で作成したアプリを`capistrano`でデプロイしましたが`js`が機能せず、画像も表示されていませんでした。
|
6
|
-
`chrome`のデベロッパーツールで確認すると下記のパスに対する`404`エラーが出ていました。
|
6
|
+
`chrome`のデベロッパーツールで確認すると下記のパスに対する`404`エラーが出ていました。(開発環境では正常に動く)
|
7
7
|
|
8
8
|
https://www.habitispower.com/packs/js/application-5f5c9ae8e623689c9d6b.js
|
9
9
|
|
@@ -123,6 +123,67 @@
|
|
123
123
|
# set :unicorn_config_path, -> { "#{current_path}/config/unicorn.conf.rb" }
|
124
124
|
```
|
125
125
|
|
126
|
+
`_login.erb` (画像を読み込んでるファイル)
|
127
|
+
```
|
128
|
+
<% @user ||= current_user %>
|
129
|
+
<% time_out?(@user) %>
|
130
|
+
<div class="container-lg login-index">
|
131
|
+
|
132
|
+
<div class="index-content">
|
133
|
+
|
134
|
+
<div class="user-content">
|
135
|
+
<%= attachment_image_tag @user, :image, fallback: "no-image.jpeg",class: "icon"%>
|
136
|
+
<div class="user-box">
|
137
|
+
<div><%= link_to @user.name, @user %></div>
|
138
|
+
<div>Lv. <%= @user.level %></div>
|
139
|
+
</div>
|
140
|
+
|
141
|
+
</div>
|
142
|
+
|
143
|
+
<% if @user.habits.blank? %>
|
144
|
+
<div class="habit-list-item">
|
145
|
+
<div class="not-habit"><%= link_to "習慣の登録", new_habit_path %></div>
|
146
|
+
</div>
|
147
|
+
<% else %>
|
148
|
+
<div class="habit-list-item">
|
149
|
+
<% @user.habits.each do |habit| %>
|
150
|
+
<div data-option="<%= habit.id %> "class="habit-show"><%= habit.task %></div>
|
151
|
+
|
152
|
+
<div class="habit-modal habit-id<%= habit.id %>">
|
153
|
+
|
154
|
+
<div class="modal-box">
|
155
|
+
<p class="pb-4 modal-task">習慣 <%= habit.task %></p>
|
156
|
+
<div class="modal-item">
|
157
|
+
<p>週 <%= habit.frequency %>回</p>
|
158
|
+
<p>達成(週) <%= habit.complete %>回</p>
|
159
|
+
<p>終了日時 <%= habit.end_time %>日</p>
|
160
|
+
</div>
|
161
|
+
<div class="close-modal">
|
162
|
+
<i class="fa fa-2x fa-times"></i>
|
163
|
+
</div>
|
164
|
+
</div>
|
165
|
+
|
166
|
+
</div>
|
167
|
+
<% end %>
|
168
|
+
</div>
|
169
|
+
<% end %>
|
170
|
+
<div class="mt-5">
|
171
|
+
<%= link_to "記録する", mission_user_path(@user) %>
|
172
|
+
<%= link_to "投稿する", new_post_path %>
|
173
|
+
</div>
|
174
|
+
|
175
|
+
</div>
|
176
|
+
|
177
|
+
</div>
|
178
|
+
<% if @message %>
|
179
|
+
<script type="text/javascript">
|
180
|
+
toastr.error("<%= @message %>")
|
181
|
+
<% @tasks.each do |task| %>
|
182
|
+
toastr.error("<%= task + "を実行できませんでした" %>")
|
183
|
+
<% end %>
|
184
|
+
</script>
|
185
|
+
<% end %>
|
186
|
+
```
|
126
187
|
#環境
|
127
188
|
|
128
189
|
`capistrano 3.15.0`
|