teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

4

解決

2020/07/17 14:10

投稿

psc
psc

スコア11

title CHANGED
File without changes
body CHANGED
@@ -179,4 +179,9 @@
179
179
  run bundle exec spring binstub --all
180
180
  * bin/rake: Spring inserted
181
181
  * bin/rails: Spring inserted
182
- ```
182
+ ```
183
+
184
+ [2020/7/17 追記]
185
+ 解決しました!
186
+ - 最初のエラーは docker-compose down 後に解決
187
+ - Rails newが通ったのにファイルが生成されていない問題は、WSL環境だとDocker-compose.ymlでのvolume設定でローカルディレクトリを指定するとき相対パスが使えないことに原因があったようです。絶対パスで修正したらファイル生成ができました。

3

ログの不要部を削除

2020/07/17 14:10

投稿

psc
psc

スコア11

title CHANGED
File without changes
body CHANGED
@@ -145,115 +145,7 @@
145
145
  Using rake 13.0.1
146
146
  Using concurrent-ruby 1.1.6
147
147
  Using i18n 1.8.3
148
- Using minitest 5.14.1
149
- Using thread_safe 0.3.6
150
- Using tzinfo 1.2.7
151
- Using activesupport 5.2.4.3
152
- Using builder 3.2.4
153
- Using erubi 1.9.0
154
- Using mini_portile2 2.4.0
155
- Using nokogiri 1.10.10
156
- Using rails-dom-testing 2.0.3
157
- Using crass 1.0.6
158
- Using loofah 2.6.0
159
- Using rails-html-sanitizer 1.3.0
160
- Using actionview 5.2.4.3
161
- Using rack 2.2.3
148
+ (略)
162
- Using rack-test 1.1.0
163
- Using actionpack 5.2.4.3
164
- Using nio4r 2.5.2
165
- Using websocket-extensions 0.1.5
166
- Using websocket-driver 0.7.3
167
- Using actioncable 5.2.4.3
168
- Using globalid 0.4.2
169
- Using activejob 5.2.4.3
170
- Using mini_mime 1.0.2
171
- Using mail 2.7.1
172
- Using actionmailer 5.2.4.3
173
- Using activemodel 5.2.4.3
174
- Using arel 9.0.0
175
- Using activerecord 5.2.4.3
176
- Using mimemagic 0.3.5
177
- Using marcel 0.3.3
178
- Using activestorage 5.2.4.3
179
- Fetching public_suffix 4.0.5
180
- Installing public_suffix 4.0.5
181
- Fetching addressable 2.7.0
182
- Installing addressable 2.7.0
183
- Fetching io-like 0.3.1
184
- Installing io-like 0.3.1
185
- Fetching archive-zip 0.12.0
186
- Installing archive-zip 0.12.0
187
- Fetching bindex 0.8.1
188
- Installing bindex 0.8.1 with native extensions
189
- Fetching msgpack 1.3.3
190
- Installing msgpack 1.3.3 with native extensions
191
- Fetching bootsnap 1.4.6
192
- Installing bootsnap 1.4.6 with native extensions
193
- Using bundler 2.1.4
194
- Fetching byebug 11.1.3
195
- Installing byebug 11.1.3 with native extensions
196
- Fetching regexp_parser 1.7.1
197
- Installing regexp_parser 1.7.1
198
- Fetching xpath 3.2.0
199
- Installing xpath 3.2.0
200
- Fetching capybara 3.33.0
201
- Installing capybara 3.33.0
202
- Fetching childprocess 3.0.0
203
- Installing childprocess 3.0.0
204
- Fetching chromedriver-helper 2.1.1
205
- Installing chromedriver-helper 2.1.1
206
- Fetching coffee-script-source 1.12.2
207
- Installing coffee-script-source 1.12.2
208
- Fetching execjs 2.7.0
209
- Installing execjs 2.7.0
210
- Fetching coffee-script 2.4.1
211
- Installing coffee-script 2.4.1
212
- Using method_source 1.0.0
213
- Using thor 1.0.1
214
- Using railties 5.2.4.3
215
- Fetching coffee-rails 4.2.2
216
- Installing coffee-rails 4.2.2
217
- Fetching ffi 1.13.1
218
- Installing ffi 1.13.1 with native extensions
219
- Fetching jbuilder 2.10.0
220
- Installing jbuilder 2.10.0
221
- Fetching rb-fsevent 0.10.4
222
- Installing rb-fsevent 0.10.4
223
- Fetching rb-inotify 0.10.1
224
- Installing rb-inotify 0.10.1
225
- Fetching ruby_dep 1.5.0
226
- Installing ruby_dep 1.5.0
227
- Fetching listen 3.1.5
228
- Installing listen 3.1.5
229
- Fetching pg 1.2.3
230
- Installing pg 1.2.3 with native extensions
231
- Fetching puma 3.12.6
232
- Installing puma 3.12.6 with native extensions
233
- Fetching sprockets 3.7.2
234
- Installing sprockets 3.7.2
235
- Using sprockets-rails 3.2.1
236
- Using rails 5.2.4.3
237
- Fetching rubyzip 2.3.0
238
- Installing rubyzip 2.3.0
239
- Fetching sass-listen 4.0.0
240
- Installing sass-listen 4.0.0
241
- Fetching sass 3.7.4
242
- Installing sass 3.7.4
243
- Fetching tilt 2.0.10
244
- Installing tilt 2.0.10
245
- Fetching sass-rails 5.1.0
246
- Installing sass-rails 5.1.0
247
- Fetching selenium-webdriver 3.142.7
248
- Installing selenium-webdriver 3.142.7
249
- Fetching spring 2.1.0
250
- Installing spring 2.1.0
251
- Fetching spring-watcher-listen 2.0.1
252
- Installing spring-watcher-listen 2.0.1
253
- Fetching turbolinks-source 5.2.0
254
- Installing turbolinks-source 5.2.0
255
- Fetching turbolinks 5.2.1
256
- Installing turbolinks 5.2.1
257
149
  Fetching uglifier 4.2.0
258
150
  Installing uglifier 4.2.0
259
151
  Fetching web-console 3.7.0

2

記法の修正

2020/07/15 12:46

投稿

psc
psc

スコア11

title CHANGED
File without changes
body CHANGED
@@ -100,10 +100,12 @@
100
100
  ディレクトリのマウントがうまくいっていないのかと思い、
101
101
  停止したコンテナに入って/myapp 以下をls -la してみる、
102
102
  プロジェクトファイルをいくつかfindしてみるなどで探してみてもプロジェクトファイルらしきものは見当たりませんでしたので、おそらくどこかでRails new が失敗しているのでしょうか?
103
+
103
104
  ログを見てもエラーは見当たらない(見逃しているだけでしたら申し訳ありません)ようなので、
104
105
  何が原因かまだ自力でたどり着けておりません…。
105
106
 
106
- ```
107
+ ▼ログ
108
+ ```consolelog
107
109
  Successfully tagged (アプリ名)_web:latest
108
110
  WARNING: Image for service web was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
109
111
  exist

1

Rails newがうまくいっていないように見える件について追記しました

2020/07/15 12:41

投稿

psc
psc

スコア11

title CHANGED
File without changes
body CHANGED
@@ -89,4 +89,200 @@
89
89
 
90
90
  使用している設定ファイルはほぼ↑と同じで、Rubyのバージョンだけ2.7にしたものです。
91
91
 
92
- お手数ですがどなたかお知恵をお借りできると幸いです。
92
+ お手数ですがどなたかお知恵をお借りできると幸いです。
93
+
94
+ ## 追記
95
+ y_shinodaさんに追記頂いた手順でやってみたのですが、
96
+ 以下のようにcreate...のログが出ておりRails newできたように一見見えたものの、
97
+ 実行後/myapp にマウントしているローカルディレクトリにはプロジェクトファイルができていませんでした。
98
+ (Gemfileも最初のものから書き換わっていません)
99
+
100
+ ディレクトリのマウントがうまくいっていないのかと思い、
101
+ 停止したコンテナに入って/myapp 以下をls -la してみる、
102
+ プロジェクトファイルをいくつかfindしてみるなどで探してみてもプロジェクトファイルらしきものは見当たりませんでしたので、おそらくどこかでRails new が失敗しているのでしょうか?
103
+ ログを見てもエラーは見当たらない(見逃しているだけでしたら申し訳ありません)ようなので、
104
+ 何が原因かまだ自力でたどり着けておりません…。
105
+
106
+ ```
107
+ Successfully tagged (アプリ名)_web:latest
108
+ WARNING: Image for service web was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
109
+ exist
110
+ create README.md
111
+ create Rakefile
112
+ create .ruby-version
113
+ create config.ru
114
+ create .gitignore
115
+ create Gemfile
116
+ run git init from "."
117
+ Initialized empty Git repository in /myapp/.git/
118
+ create package.json
119
+ create app
120
+ create app/assets/config/manifest.js
121
+ create app/assets/javascripts/application.js
122
+ (略)
123
+ append .gitignore
124
+ /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/message_encryptor.rb:175: warning: Using the last argument
125
+ as keyword parameters is deprecated; maybe ** should be added to the call
126
+ /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/messages/metadata.rb:17: warning: The called method `wrap'
127
+ is defined here
128
+ create config/boot.rb
129
+ create config/database.yml
130
+ create db
131
+ (略)
132
+ create storage
133
+ create storage/.keep
134
+ create tmp/storage
135
+ create tmp/storage/.keep
136
+ remove config/initializers/cors.rb
137
+ remove config/initializers/new_framework_defaults_5_2.rb
138
+ run bundle install
139
+ The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
140
+ Fetching gem metadata from https://rubygems.org/............
141
+ Fetching gem metadata from https://rubygems.org/.
142
+ Resolving dependencies...
143
+ Using rake 13.0.1
144
+ Using concurrent-ruby 1.1.6
145
+ Using i18n 1.8.3
146
+ Using minitest 5.14.1
147
+ Using thread_safe 0.3.6
148
+ Using tzinfo 1.2.7
149
+ Using activesupport 5.2.4.3
150
+ Using builder 3.2.4
151
+ Using erubi 1.9.0
152
+ Using mini_portile2 2.4.0
153
+ Using nokogiri 1.10.10
154
+ Using rails-dom-testing 2.0.3
155
+ Using crass 1.0.6
156
+ Using loofah 2.6.0
157
+ Using rails-html-sanitizer 1.3.0
158
+ Using actionview 5.2.4.3
159
+ Using rack 2.2.3
160
+ Using rack-test 1.1.0
161
+ Using actionpack 5.2.4.3
162
+ Using nio4r 2.5.2
163
+ Using websocket-extensions 0.1.5
164
+ Using websocket-driver 0.7.3
165
+ Using actioncable 5.2.4.3
166
+ Using globalid 0.4.2
167
+ Using activejob 5.2.4.3
168
+ Using mini_mime 1.0.2
169
+ Using mail 2.7.1
170
+ Using actionmailer 5.2.4.3
171
+ Using activemodel 5.2.4.3
172
+ Using arel 9.0.0
173
+ Using activerecord 5.2.4.3
174
+ Using mimemagic 0.3.5
175
+ Using marcel 0.3.3
176
+ Using activestorage 5.2.4.3
177
+ Fetching public_suffix 4.0.5
178
+ Installing public_suffix 4.0.5
179
+ Fetching addressable 2.7.0
180
+ Installing addressable 2.7.0
181
+ Fetching io-like 0.3.1
182
+ Installing io-like 0.3.1
183
+ Fetching archive-zip 0.12.0
184
+ Installing archive-zip 0.12.0
185
+ Fetching bindex 0.8.1
186
+ Installing bindex 0.8.1 with native extensions
187
+ Fetching msgpack 1.3.3
188
+ Installing msgpack 1.3.3 with native extensions
189
+ Fetching bootsnap 1.4.6
190
+ Installing bootsnap 1.4.6 with native extensions
191
+ Using bundler 2.1.4
192
+ Fetching byebug 11.1.3
193
+ Installing byebug 11.1.3 with native extensions
194
+ Fetching regexp_parser 1.7.1
195
+ Installing regexp_parser 1.7.1
196
+ Fetching xpath 3.2.0
197
+ Installing xpath 3.2.0
198
+ Fetching capybara 3.33.0
199
+ Installing capybara 3.33.0
200
+ Fetching childprocess 3.0.0
201
+ Installing childprocess 3.0.0
202
+ Fetching chromedriver-helper 2.1.1
203
+ Installing chromedriver-helper 2.1.1
204
+ Fetching coffee-script-source 1.12.2
205
+ Installing coffee-script-source 1.12.2
206
+ Fetching execjs 2.7.0
207
+ Installing execjs 2.7.0
208
+ Fetching coffee-script 2.4.1
209
+ Installing coffee-script 2.4.1
210
+ Using method_source 1.0.0
211
+ Using thor 1.0.1
212
+ Using railties 5.2.4.3
213
+ Fetching coffee-rails 4.2.2
214
+ Installing coffee-rails 4.2.2
215
+ Fetching ffi 1.13.1
216
+ Installing ffi 1.13.1 with native extensions
217
+ Fetching jbuilder 2.10.0
218
+ Installing jbuilder 2.10.0
219
+ Fetching rb-fsevent 0.10.4
220
+ Installing rb-fsevent 0.10.4
221
+ Fetching rb-inotify 0.10.1
222
+ Installing rb-inotify 0.10.1
223
+ Fetching ruby_dep 1.5.0
224
+ Installing ruby_dep 1.5.0
225
+ Fetching listen 3.1.5
226
+ Installing listen 3.1.5
227
+ Fetching pg 1.2.3
228
+ Installing pg 1.2.3 with native extensions
229
+ Fetching puma 3.12.6
230
+ Installing puma 3.12.6 with native extensions
231
+ Fetching sprockets 3.7.2
232
+ Installing sprockets 3.7.2
233
+ Using sprockets-rails 3.2.1
234
+ Using rails 5.2.4.3
235
+ Fetching rubyzip 2.3.0
236
+ Installing rubyzip 2.3.0
237
+ Fetching sass-listen 4.0.0
238
+ Installing sass-listen 4.0.0
239
+ Fetching sass 3.7.4
240
+ Installing sass 3.7.4
241
+ Fetching tilt 2.0.10
242
+ Installing tilt 2.0.10
243
+ Fetching sass-rails 5.1.0
244
+ Installing sass-rails 5.1.0
245
+ Fetching selenium-webdriver 3.142.7
246
+ Installing selenium-webdriver 3.142.7
247
+ Fetching spring 2.1.0
248
+ Installing spring 2.1.0
249
+ Fetching spring-watcher-listen 2.0.1
250
+ Installing spring-watcher-listen 2.0.1
251
+ Fetching turbolinks-source 5.2.0
252
+ Installing turbolinks-source 5.2.0
253
+ Fetching turbolinks 5.2.1
254
+ Installing turbolinks 5.2.1
255
+ Fetching uglifier 4.2.0
256
+ Installing uglifier 4.2.0
257
+ Fetching web-console 3.7.0
258
+ Installing web-console 3.7.0
259
+ Bundle complete! 18 Gemfile dependencies, 78 gems now installed.
260
+ Use `bundle info [gemname]` to see where a bundled gem is installed.
261
+ Post-install message from chromedriver-helper:
262
+
263
+ +--------------------------------------------------------------------+
264
+ | |
265
+ | NOTICE: chromedriver-helper is deprecated after 2019-03-31. |
266
+ | |
267
+ | Please update to use the 'webdrivers' gem instead. |
268
+ | See https://github.com/flavorjones/chromedriver-helper/issues/83 |
269
+ | |
270
+ +--------------------------------------------------------------------+
271
+
272
+ Post-install message from sass:
273
+
274
+ Ruby Sass has reached end-of-life and should no longer be used.
275
+
276
+ * If you use Sass as a command-line tool, we recommend using Dart Sass, the new
277
+ primary implementation: https://sass-lang.com/install
278
+
279
+ * If you use Sass as a plug-in for a Ruby web framework, we recommend using the
280
+ sassc gem: https://github.com/sass/sassc-ruby#readme
281
+
282
+ * For more details, please refer to the Sass blog:
283
+ https://sass-lang.com/blog/posts/7828841
284
+
285
+ run bundle exec spring binstub --all
286
+ * bin/rake: Spring inserted
287
+ * bin/rails: Spring inserted
288
+ ```