Reputation: 2322
I am developing a rails application in my mac and testing at localhost:/3000 I need to test some of the features in IE8. I downloaded virtualbox and set up a VM for it. I had my rails service running in my mac tried the following different ways but didnt work.
http://192.168.1.2:3000
Did ipconfig in windows cmd and found out the IP address was 10.0.2.15.
http://10.0.2.15:3000
Did a host name on my mac and tried the following in my windows:
mac-hostname:3000
But none of the above worked.
Upvotes: 0
Views: 843
Reputation: 2322
Here is what I did to solve the issue. I updated the /etc/hosts file I added the IP address and renamed the localhost to something else
10.0.2.2 localtest
And in my broswer I enter:
http://localtest:3000
Upvotes: 1
Reputation: 47548
I have this working. Check your VM settings. In my case the Network tab has 'Attached to:' set to NAT.
The host address (192.168.1.2) is where you should point your browser. The 10.0.2.15 address belongs to the VM client. You should be able to open a command window in the VM and do tracert 192.168.1.2
and get there in 2 hops.
P.S.: You may also be able to get this working with a bridged adapter. I'm just telling you what works for me.
Upvotes: 0