views:

56

answers:

1

I develop rails in ubuntu and i just set up a virtualbox windows xp virtual machine for IE testing. I'd like to be able to run mongrel_rails in ubuntu and then jump into the vm to check it out, so i can jump back, make a change, jump into the vm again, reload the page and test it, etc. Is this possible?

In this sort of situation in the past i've had to set up an apache server on my dev machine and run mongrel under that, in order to get an externally visible (ie visible to my local network) ip address that i then paste into the address bar of IE in the vm. Is this really necessary? Is there a simpler way? Can i do something with my /etc/hosts or sites-available files to just make up some arbitrary network address which points to localhost:3000 in ubuntu? Or something?

thanks, max

EDIT: i actually just set up an apache vhost which proxies the running mongrel server, which was much easier than i thought, using this guide: http://www.debian-administration.org/articles/495

So, it's sorted now. thanks for reading.

+1  A: 

Just for the record: if I understand right, localhost:3000 is the physical machine, which you want to access from the VM? Depending on how the VM is set up, you could just call http://<ip-of-physical>:3000/. There is nothing special to the localhost part. So if your physical box has 192.168.1.1 you would type

http://192.168.1.1:3000/

in the browser on the VM.

jhwist
hi jhwist - that's what i did, but in order to make it visible to another machine i had to set up an apache vhost. The ip address of the physical machine, and port number of the process, isn't enough, it seems i need apache (or similar) to handle the communication. I couldn't make it work without that anyway.
Max Williams
actually it looks like i'm just a dumbass, i stopped apache and tried http://192.168.1.68:3000 and it worked. Wonder what i was doing wrong before... :/ thanks! max
Max Williams