-3

i spend a hold day to build the vagrant env on the windows ,and use the rbenv build the ruby env & install the rails !

evrythings ok,but when i start the rails s found i can't access on the chrome,then i use the ubuntu links to ping the 127.0.0.1:3000 it's ok,but ping the 192.168.10.10:3000 told me the connection refused!

enter image description here

that's my vagrantfile setting ,just only setting the private_network ip

anyone else can tell me how to resolv the problem?

Community
  • 1
  • 1
Evan Chen
  • 3
  • 1

1 Answers1

0

You need a forwading port like that :

config.vm.network "forwarded_port", guest: 3000, host: 3000
auto_correct: true

Add auto_correct if you aren't sure that the 3000 port is available on host...

Mech45
  • 321
  • 1
  • 9