質問編集履歴
1
質問の追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -275,3 +275,55 @@
|
|
275
275
|
end
|
276
276
|
|
277
277
|
```
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
### 追記
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
`rails s -b 0.0.0.0`と打てば問題なくつながると書きましたが、この方法でつないだ時はターミナルは以下のようになります。
|
286
|
+
|
287
|
+
```
|
288
|
+
|
289
|
+
vagrant@ubuntu-bionic:/vagrant/sample$ rails s -b 0.0.0.0
|
290
|
+
|
291
|
+
=> Booting Puma
|
292
|
+
|
293
|
+
=> Rails 5.2.3 application starting in development
|
294
|
+
|
295
|
+
=> Run `rails server -h` for more startup options
|
296
|
+
|
297
|
+
Puma starting in single mode...
|
298
|
+
|
299
|
+
* Version 3.12.1 (ruby 2.5.5-p157), codename: Llamas in Pajamas
|
300
|
+
|
301
|
+
* Min threads: 5, max threads: 5
|
302
|
+
|
303
|
+
* Environment: development
|
304
|
+
|
305
|
+
* Listening on tcp://0.0.0.0:3000
|
306
|
+
|
307
|
+
Use Ctrl-C to stop
|
308
|
+
|
309
|
+
Started GET "/" for 10.0.2.2 at 2019-05-27 09:19:28 +0000
|
310
|
+
|
311
|
+
Cannot render console from 10.0.2.2! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
|
312
|
+
|
313
|
+
Processing by Rails::WelcomeController#index as HTML
|
314
|
+
|
315
|
+
Rendering /var/lib/gems/2.5.0/gems/railties-5.2.3/lib/rails/templates/rails/welcome/index.html.erb
|
316
|
+
|
317
|
+
Rendered /var/lib/gems/2.5.0/gems/railties-5.2.3/lib/rails/templates/rails/welcome/index.html.erb (4.2ms)
|
318
|
+
|
319
|
+
Completed 200 OK in 22ms (Views: 8.9ms | ActiveRecord: 0.0ms)
|
320
|
+
|
321
|
+
```
|
322
|
+
|
323
|
+
このうち
|
324
|
+
|
325
|
+
> Cannot render console from 10.0.2.2! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
の部分が気になったので調べてみて、`config/application.rb`に`whitelist`を追加したら上記のメッセージは消えましたが、依然として`-b 0.0.0.0`を付けない`rails s`では http://localhost:3000 に繋げませんので今は戻しています。
|