質問編集履歴
2
ターミナル上でのエラー内容を追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -185,6 +185,56 @@
|
|
185
185
|
module.exports = environment
|
186
186
|
```
|
187
187
|
|
188
|
+
# エラー内容
|
189
|
+
```
|
190
|
+
(0.4ms) SELECT sqlite_version(*)
|
191
|
+
(0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
|
192
|
+
Processing by StaticPagesController#home as HTML
|
193
|
+
Rendering layout layouts/application.html.erb
|
194
|
+
Rendering static_pages/home.html.erb within layouts/application
|
195
|
+
Rendered static_pages/home.html.erb within layouts/application (Duration: 1.8ms | Allocations: 557)
|
196
|
+
[Webpacker] Compiling...
|
197
|
+
[Webpacker] Compilation failed:
|
198
|
+
Hash: fdeeca607e1e499129f7
|
199
|
+
Version: webpack 4.46.0
|
200
|
+
Time: 1529ms
|
201
|
+
Built at: 2021/12/18 16:54:42
|
202
|
+
Asset Size Chunks Chunk Names
|
203
|
+
js/application-7c8532601664106d1dd3.js 1020 KiB application [emitted] [immutable] application
|
204
|
+
js/application-7c8532601664106d1dd3.js.map 1.08 MiB application [emitted] [dev] application
|
205
|
+
manifest.json 364 bytes [emitted]
|
206
|
+
Entrypoint application = js/application-7c8532601664106d1dd3.js js/application-7c8532601664106d1dd3.js.map
|
207
|
+
[./app/javascript/channels sync recursive _channel.js$] ./app/javascript/channels sync _channel.js$ 160 bytes {application} [built]
|
208
|
+
[./app/javascript/channels/index.js] 211 bytes {application} [built]
|
209
|
+
[./app/javascript/packs/application.js] 780 bytes {application} [built]
|
210
|
+
[./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 552 bytes {application} [built]
|
211
|
+
+ 112 hidden modules
|
212
|
+
|
213
|
+
ERROR in ./node_modules/bootstrap/dist/js/bootstrap.esm.js
|
214
|
+
Module not found: Error: Can't resolve '@popperjs/core' in '/Users/name/name/applicationname/node_modules/bootstrap/dist/js'
|
215
|
+
@ ./node_modules/bootstrap/dist/js/bootstrap.esm.js 60:0-41 2356:17-23 2375:21-40 4029:15-21 4164:23-42
|
216
|
+
@ ./app/javascript/packs/application.js
|
217
|
+
|
218
|
+
Rendered layouts/_head.html.erb (Duration: 2434.1ms | Allocations: 19838)
|
219
|
+
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
|
220
|
+
↳ app/helpers/sessions_helper.rb:12:in `current_user'
|
221
|
+
Rendered layouts/_header.html.erb (Duration: 7.0ms | Allocations: 6717)
|
222
|
+
Rendered layouts/_footer.html.erb (Duration: 0.3ms | Allocations: 176)
|
223
|
+
Rendered layout layouts/application.html.erb (Duration: 2444.6ms | Allocations: 28332)
|
224
|
+
Completed 200 OK in 2455ms (Views: 2449.5ms | ActiveRecord: 0.4ms | Allocations: 32364)
|
225
|
+
|
226
|
+
|
227
|
+
Started GET "/logout" for 127.0.0.1 at 2021-12-18 16:54:50 +0900
|
228
|
+
|
229
|
+
ActionController::RoutingError (No route matches [GET] "/logout"):
|
230
|
+
|
231
|
+
Started GET "/logout" for 127.0.0.1 at 2021-12-18 16:55:08 +0900
|
232
|
+
Processing by SessionsController#destroy as HTML
|
233
|
+
Redirected to http://127.0.0.1:3000/
|
234
|
+
Completed 302 Found in 1ms (Allocations: 428)
|
235
|
+
```
|
236
|
+
|
237
|
+
|
188
238
|
# 各バージョン
|
189
239
|
|
190
240
|
ruby3.0.2
|
1
_header.html.erbを追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -53,6 +53,39 @@
|
|
53
53
|
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
|
54
54
|
</head>
|
55
55
|
```
|
56
|
+
続いて下記はheader部分のソースコードです。
|
57
|
+
```html
|
58
|
+
<header class="navbar navbar-fixed-top navbar-inverse">
|
59
|
+
<div class="container">
|
60
|
+
<%= link_to "GYMOHA APP", root_path, id: "logo" %>
|
61
|
+
<nav>
|
62
|
+
<ul class="nav navbar-nav navbar-right">
|
63
|
+
<li><%= link_to "ホーム", root_path %></li>
|
64
|
+
<li><%= link_to "GYMOHAとは?", about_path %></li>
|
65
|
+
<% if logged_in? %>
|
66
|
+
<li><%= link_to "ユーザー", '#' %></li>
|
67
|
+
<li class="dropdown">
|
68
|
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
69
|
+
アカウント <b class="caret"></b>
|
70
|
+
</a>
|
71
|
+
<ul class="dropdown-menu">
|
72
|
+
<li><%= link_to "プロフィール", current_user %></li>
|
73
|
+
<li><%= link_to "設定", '#' %></li>
|
74
|
+
<li class="divider"></li>
|
75
|
+
<li>
|
76
|
+
<%= link_to "ログアウト", logout_path, method: :delete %>
|
77
|
+
</li>
|
78
|
+
</ul>
|
79
|
+
</li>
|
80
|
+
<% else %>
|
81
|
+
<li><%= link_to "ログイン", login_path %></li>
|
82
|
+
<% end %>
|
83
|
+
</ul>
|
84
|
+
</nav>
|
85
|
+
</div>
|
86
|
+
</header>
|
87
|
+
```
|
88
|
+
続いて下記はgemfileです。
|
56
89
|
```gemfile
|
57
90
|
source 'https://rubygems.org'
|
58
91
|
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|