Reputation: 1385
Machines:
Notes
Pre-requisite
bundle exec rails s -p 3000
Problem
http://localhost:3000
NOT workinghttps://192.168.1.37:3000
workingWhat Is Needed
http://locahost:3000
Quirks
Upvotes: 0
Views: 2319
Reputation: 61
why do you insist to visit the site via localhost:3000? as you are running the app under vm, if you want to access the webpage from another pc/mac via ip, you have to forward the local port to the vm port via nat, or let the vm to own a ip from your local network.
As you can access the webpage via https://192.168.1.37:3000, rails is running, there's nothing to do with rails configurations.
Upvotes: 3
Reputation: 7655
Rails 4 binds on localhost
by default, so you will need to bind to 0.0.0.0
, if you want the page to be accessible from another machine.
Start your rails server like this:
bundle exec rails s -p 3000 -b 0.0.0.0
Upvotes: 1