I'm just trying to run my server locally. I'm on Windows and using Ruby on Rails on Windows is a pain, so I am using Vagrant. I am doing all of these commands from my Vagrant shell.
I've tried rails s
and rails s -b 0.0.0.0
. Both give me OK responses in the terminal:
=> Rails 5.2.3 application starting in development
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.12.1 (ruby 2.6.1-p33), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: development
However, when I go to localhost:3000
in my browser, it gives me:
This site can't be reached.
localhost refused to connect.
When I tried to curl http://localhost:3000
get:
curl: (7) Failed to connect to localhost port 3000: Connection refused
I also have the following line of code in my Vagrantfile:
config.vm.network "forwarded_port", guest: 3000, host: 3000
Really don't know what to do next. Right now, I am installing Ubuntu ISO file (will be done in 5 hours, so that's quite a bit of time) to create a VirtualBox instance as backup if this doesn't work. Hoping I can find a fix for this.