質問編集履歴
2
文章の訂正
test
CHANGED
File without changes
|
test
CHANGED
@@ -60,47 +60,9 @@
|
|
60
60
|
|
61
61
|
remote: For more information see: https://github.com/rails/sprockets/blob/070fc01947c111d35bb4c836e9bb71962a8e0595/UPGRADING.md#manifestjs
|
62
62
|
|
63
|
-
|
63
|
+
|
64
|
-
|
65
|
-
|
64
|
+
|
66
|
-
|
67
|
-
remote: /tmp/build_38fd9c22/vendor/bundle/ruby/2.6.0/gems/railties-6.1.3.2/lib/rails/initializable.rb:32:in `run'
|
68
|
-
|
69
|
-
remote: /tmp/build_38fd9c22/vendor/bundle/ruby/2.6.0/gems/railties-6.1.3.2/lib/rails/initializable.rb:61:in `block in run_initializers'
|
70
|
-
|
71
|
-
remote: /tmp/build_38fd9c22/vendor/bundle/ruby/2.6.0/gems/railties-6.1.3.2/lib/rails/initializable.rb:60:in `run_initializers'
|
72
|
-
|
73
|
-
remote: /tmp/build_38fd9c22/vendor/bundle/ruby/2.6.0/gems/railties-6.1.3.2/lib/rails/application.rb:384:in `initialize!'
|
74
|
-
|
75
|
-
remote: /tmp/build_38fd9c22/config/environment.rb:5:in `<main>'
|
76
|
-
|
77
|
-
remote: /tmp/build_38fd9c22/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
|
78
|
-
|
79
|
-
remote: /tmp/build_38fd9c22/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
|
80
|
-
|
81
|
-
remote: /tmp/build_38fd9c22/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
|
82
|
-
|
83
|
-
remote: /tmp/build_38fd9c22/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
|
84
|
-
|
85
|
-
remote: /tmp/build_38fd9c22/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
|
86
|
-
|
87
|
-
remote: /tmp/build_38fd9c22/vendor/bundle/ruby/2.6.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
|
88
|
-
|
89
|
-
remote: /tmp/build_38fd9c22/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:332:in `block in require'
|
90
|
-
|
91
|
-
remote: /tmp/build_38fd9c22/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:299:in `load_dependency'
|
92
|
-
|
93
|
-
remote: /tmp/build_38fd9c22/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:332:in `require'
|
94
|
-
|
95
|
-
remote: /tmp/build_38fd9c22/vendor/bundle/ruby/2.6.0/gems/railties-6.1.3.2/lib/rails/application.rb:360:in `require_environment!'
|
96
|
-
|
97
|
-
remote: /tmp/build_38fd9c22/vendor/bundle/ruby/2.6.0/gems/railties-6.1.3.2/lib/rails/application.rb:526:in `block in run_tasks_blocks'
|
98
|
-
|
99
|
-
remote: /tmp/build_38fd9c22/vendor/bundle/ruby/2.6.0/gems/sprockets-rails-3.2.2/lib/sprockets/rails/task.rb:61:in `block (2 levels) in define'
|
100
|
-
|
101
|
-
remote: Tasks: TOP => environment
|
102
|
-
|
103
|
-
|
65
|
+
(中略)
|
104
66
|
|
105
67
|
|
106
68
|
|
@@ -170,7 +132,13 @@
|
|
170
132
|
|
171
133
|
多くのサイトに以下の一文を足すと良いと書かれていたので実行しました
|
172
134
|
|
135
|
+
```
|
136
|
+
|
173
|
-
|
137
|
+
config/environments/production.rbへの記述
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
174
142
|
|
175
143
|
config.assets.initialize_on_precompile = false
|
176
144
|
|
@@ -178,7 +146,13 @@
|
|
178
146
|
|
179
147
|
全体はこのようなコードです。
|
180
148
|
|
149
|
+
```
|
150
|
+
|
181
|
-
|
151
|
+
config/environments/production.rb内
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
182
156
|
|
183
157
|
require_relative "boot"
|
184
158
|
|
1
RAILS_ENV=development bin/rails assets:precompileの応答を追記しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -294,6 +294,38 @@
|
|
294
294
|
|
295
295
|
|
296
296
|
|
297
|
+
他のサイトを参考に以下を実行すると
|
298
|
+
|
299
|
+
```terminal
|
300
|
+
|
301
|
+
$ RAILS_ENV=development bin/rails assets:precompile
|
302
|
+
|
303
|
+
yarn install v1.22.10
|
304
|
+
|
305
|
+
[1/4] ???? Resolving packages...
|
306
|
+
|
307
|
+
[2/4] ???? Fetching packages...
|
308
|
+
|
309
|
+
[3/4] ???? Linking dependencies...
|
310
|
+
|
311
|
+
[4/4] ???? Building fresh packages...
|
312
|
+
|
313
|
+
✨ Done in 2.54s.
|
314
|
+
|
315
|
+
rails aborted!
|
316
|
+
|
317
|
+
Sprockets::ArgumentError: link_directory argument must be a directory
|
318
|
+
|
319
|
+
/app/assets/config/manifest.js:2
|
320
|
+
|
321
|
+
Tasks: TOP => assets:precompile
|
322
|
+
|
323
|
+
(See full trace by running task with --trace)
|
324
|
+
|
325
|
+
```
|
326
|
+
|
327
|
+
とでるのでapp/assets/config/manifest.js内のコードは変えないほうが良かったかなとも考えています。
|
328
|
+
|
297
329
|
### 補足情報(FW/ツールのバージョンなど)
|
298
330
|
|
299
331
|
|