質問編集履歴
4
もう少し読みやすくしました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
```termnal
|
16
16
|
% bundle exec cap production deproy
|
17
17
|
```
|
18
|
-
すると
|
18
|
+
すると
|
19
19
|
```error
|
20
20
|
00:10 deploy:assets:precompile
|
21
21
|
01 $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile
|
3
もう少し読みやすくしました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
```terminal
|
8
8
|
% bundle exec cap production deproy
|
9
9
|
```
|
10
|
-
で今までデプロイしてきましたが、おそらくプルリクエスト前にgit pull origin masterをしてしまったのが原因かと思いますが、デプロイができなくなりました。
|
10
|
+
で今までデプロイしてきましたが、おそらくプルリクエスト前にgit pull origin masterをしてしまったのが原因かJavaScript関連での原因と思いますが、デプロイができなくなりました。
|
11
11
|
|
12
12
|
|
13
13
|
### 発生している問題・エラーメッセージ
|
2
もう少し読みやすくしました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,18 +1,22 @@
|
|
1
|
+
### 前提・実現したいこと
|
1
2
|
EC2で
|
2
|
-
```
|
3
|
+
```terminal
|
3
4
|
$ git pull origin master
|
4
5
|
```
|
5
6
|
からの
|
6
|
-
```
|
7
|
+
```terminal
|
7
8
|
% bundle exec cap production deproy
|
8
9
|
```
|
9
10
|
で今までデプロイしてきましたが、おそらくプルリクエスト前にgit pull origin masterをしてしまったのが原因かと思いますが、デプロイができなくなりました。
|
10
11
|
|
12
|
+
|
13
|
+
### 発生している問題・エラーメッセージ
|
14
|
+
|
11
|
-
```
|
15
|
+
```termnal
|
12
16
|
% bundle exec cap production deproy
|
13
17
|
```
|
14
18
|
すると
|
15
|
-
```
|
19
|
+
```error
|
16
20
|
00:10 deploy:assets:precompile
|
17
21
|
01 $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile
|
18
22
|
01 yarn install v1.22.5
|
@@ -91,24 +95,62 @@
|
|
91
95
|
DEBUG [557c0069] (See full trace by running task with --trace)
|
92
96
|
```
|
93
97
|
というエラーが表示されました。
|
98
|
+
|
94
|
-
|
99
|
+
### 試したこと
|
95
|
-
JavaScriptの読み込みができていないという記事は見つけましたが、ローカル環境では普通に動いている状況です。
|
96
|
-
```
|
100
|
+
```error
|
97
101
|
DEBUG [557c0069] Tasks: TOP => assets:precompile
|
98
102
|
```
|
99
103
|
とあったので
|
100
104
|
|
101
|
-
```
|
105
|
+
```terminal
|
102
106
|
tail log/capistrano.log
|
103
107
|
less log/capistrano.log
|
104
108
|
```
|
105
|
-
|
109
|
+
を実行してログを確認してみましたが、どの部分を確認すればいいか多すぎて取り組めない状況です。
|
106
110
|
|
107
111
|
assets:precomlileで止まるので、
|
108
|
-
```
|
112
|
+
```terminal
|
109
113
|
less log/production.log
|
110
114
|
```
|
111
115
|
を試してみましたが、特に期待するようなエラーはありませんでした。
|
112
116
|
したが実行結果です。
|
113
117
|

|
118
|
+
|
119
|
+
asset precompileについて言及しているみたいで調べてみると
|
120
|
+
JavaScriptの読み込みができていないという記事は見つけましたが、ローカル環境では普通に動いている状況です。
|
121
|
+
|
122
|
+
```javascript
|
123
|
+
// This file is automatically compiled by Webpack, along with any other files
|
124
|
+
// present in this directory. You're encouraged to place your actual application logic in
|
125
|
+
// a relevant structure within app/javascript and only use these pack files to reference
|
126
|
+
// that code so it'll be compiled.
|
127
|
+
|
128
|
+
require("@rails/ujs").start()
|
129
|
+
require("turbolinks").start()
|
130
|
+
require("@rails/activestorage").start()
|
131
|
+
require("channels")
|
132
|
+
require('jquery')
|
133
|
+
require('../scroll')
|
134
|
+
require('../modal')
|
135
|
+
|
136
|
+
|
137
|
+
// Uncomment to copy all static images under ../images to the output folder and reference
|
138
|
+
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
|
139
|
+
// or the `imagePath` JavaScript helper below.
|
114
|
-
|
140
|
+
//
|
141
|
+
// const images = require.context('../images', true)
|
142
|
+
// const imagePath = (name) => images(name, true)
|
143
|
+
```
|
144
|
+
|
145
|
+
JavaScript関連のgemを追加してみました。
|
146
|
+
```gemfile
|
147
|
+
gem 'sprockets-es6'
|
148
|
+
```
|
149
|
+
|
150
|
+
|
151
|
+
### 補足情報(FW/ツールのバージョンなど)
|
152
|
+
ruby 2.6.5
|
153
|
+
rails 6.0.0
|
154
|
+
|
155
|
+
|
156
|
+
ここにより詳細な情報を記載してください。
|
1
もう少し詳しくエラーを記載
title
CHANGED
File without changes
|
body
CHANGED
@@ -13,6 +13,39 @@
|
|
13
13
|
```
|
14
14
|
すると
|
15
15
|
```
|
16
|
+
00:10 deploy:assets:precompile
|
17
|
+
01 $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile
|
18
|
+
01 yarn install v1.22.5
|
19
|
+
01 [1/4] Resolving packages...
|
20
|
+
01 [2/4] Fetching packages...
|
21
|
+
01 info fsevents@2.1.3: The platform "linux" is incompatible with this module.
|
22
|
+
01 info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
|
23
|
+
01 info fsevents@1.2.13: The platform "linux" is incompatible with this module.
|
24
|
+
01 info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
|
25
|
+
01 [3/4] Linking dependencies...
|
26
|
+
01 warning " > webpack-dev-server@3.11.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
|
27
|
+
01 warning "webpack-dev-server > webpack-dev-middleware@3.7.2" has unmet peer dependency "webpack@^4.0.0".
|
28
|
+
01 [4/4] Building fresh packages...
|
29
|
+
01 Done in 11.94s.
|
30
|
+
01 yarn install v1.22.5
|
31
|
+
01 [1/4] Resolving packages...
|
32
|
+
01 [2/4] Fetching packages...
|
33
|
+
01 info fsevents@2.1.3: The platform "linux" is incompatible with this module.
|
34
|
+
01 info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
|
35
|
+
01 info fsevents@1.2.13: The platform "linux" is incompatible with this module.
|
36
|
+
01 info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
|
37
|
+
01 [3/4] Linking dependencies...
|
38
|
+
01 warning " > webpack-dev-server@3.11.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
|
39
|
+
01 warning "webpack-dev-server > webpack-dev-middleware@3.7.2" has unmet peer dependency "webpack@^4.0.0".
|
40
|
+
01 [4/4] Building fresh packages...
|
41
|
+
01 Done in 4.37s.
|
42
|
+
01 rake aborted!
|
43
|
+
01 Sass::SyntaxError: wrong number of arguments (given 4, expected 1..3) for `rgb'
|
44
|
+
|
45
|
+
--------
|
46
|
+
省略
|
47
|
+
--------
|
48
|
+
|
16
49
|
** DEPLOY FAILED
|
17
50
|
** Refer to log/capistrano.log for details. Here are the last 20 lines:
|
18
51
|
|
@@ -58,6 +91,8 @@
|
|
58
91
|
DEBUG [557c0069] (See full trace by running task with --trace)
|
59
92
|
```
|
60
93
|
というエラーが表示されました。
|
94
|
+
asset precompileについて言及しているみたいで調べてみると
|
95
|
+
JavaScriptの読み込みができていないという記事は見つけましたが、ローカル環境では普通に動いている状況です。
|
61
96
|
```
|
62
97
|
DEBUG [557c0069] Tasks: TOP => assets:precompile
|
63
98
|
```
|