opensoul.org

Passenger and browser testing in virtual machines

February 9, 2010 code 1 min read

If you’re running Passenger in development, here is how to make Windows running in a virtual machine connect to your app in Passenger.

# Boot up the VM and open up the Windows command prompt (go to “Start->Run…”, enter “cmd” and press enter)

# Type ipconfig to see the network configuration. Take note of the “Default Gateway” address.

# Navigate to C:\WINDOWS\system32\drivers\etc and edit the hosts file. Add a line with the gateway address pointing to your app’s domain (you can even list multiple on the same line).

172.16.248.2 awesomeapp.local otherawesomeapp.local

  1. Open up a browser in the VM and type in the address.

Tada! Now you can test out your app in those other browsers.

This content is open source. Suggest Improvements.

@bkeepers

avatar of Brandon Keepers I am Brandon Keepers, and I work at GitHub on making Open Source more approachable, effective, and ubiquitous. I tend to think like an engineer, work like an artist, dream like an astronaut, love like a human, and sleep like a baby.