How can I test in IE while developing under Mac OS X?

后端 未结 7 1420
闹比i
闹比i 2021-02-05 13:03

I\'ve got my web application on Mac OS X and it\'s ready for IE compatibility testing. I\'ve tried running the server, booting up VMware and pulling up localhost:3000

相关标签:
7条回答
  • 2021-02-05 13:20

    Find the IP address that Windows is using by typing ipconfig from within a Command Prompt in VMware (the number you're looking for is labelled IP Address). Then replace the last number with a 1 or a 2.

    For example, if the IP address that Windows is using within VMware is 192.168.78.0 then your Rails application will be available at:

    http://192.168.78.1:3000/
    0 讨论(0)
  • 2021-02-05 13:26

    I don't know if this will work for all the networking modes but I did this and it worked first time for me on default vmware installation.

    • Open a command prompt window
    • run > ipconfig
    • read the Default Gateway IP Address = w.x.y.z
    • Open IE
    • enter http:://w.x.y.z:3000 as the URL

    This worked but then I used the technique mentioned by tadman's answer to add the IP address to the c:\windows\system32\drivers\etc\hosts...

    w.x.y.z maclocal

    naming my host "maclocal"....I picked this name at random.

    Then accessed the server using

    http://maclocal:3000

    0 讨论(0)
  • 2021-02-05 13:27

    All you need is the correct IP address that VMWare uses to access your mac, then you can access it like this:

    http://192.168.1.2:3000

    And test it just fine. I would tell you how to find it but I have more experience with Parallels.

    EDIT Ok, it seems you need to open your network connection information in the guest operating system (Windows) and grab the "Gateway" address which should be the IP address that VMWare is using to connect to your Mac. Simply add :3000 to the end of it and you should be able to access your Rails site from Internet Explorer (be sure to put the http:// on as well).

    0 讨论(0)
  • 2021-02-05 13:35

    In your Macs Terminal, type

    ifconfig vmnet1
    

    You will get back something like:

    vmnet1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        ether .... 
        inet 192.168.18.1 netmask 0xffffff00 broadcast 192.168.18.255
    

    You can use the IP returned after "inet" (192.168.18.1 in this case) to connect to your app like e.g

    http://192.168.18.1:3000
    

    As opposed to the other answers given, using the gateway address of the Windows client does not work for me, it is different.

    0 讨论(0)
  • 2021-02-05 13:37

    You can't use localhost from within VmWare (unless the rails app is running inside the VmWare image). You need the ip address or hostname of the host machine, the mac in this case!

    0 讨论(0)
  • 2021-02-05 13:40

    VMWare has three different networking modes:

    • NAT - The image is run in an isolated network that is routed through the host computer.
    • Bridged - The image is run on the same network as the host computer as an independent device.
    • Host Only - The image is run in an isolated network that is not routed.

    In NAT mode you need to check the gateway IP and use that as you would localhost. Since this number appears to be arbitrary, yet unchanging for any given image, it may be more convenient to make an entry in your HOSTS file to save it for posterity.

    In bridged mode, you simply use the IP address of the host machine, not the special VMWare one.

    Using NAT is the most straightforward, as you simply have to check the output of ROUTE PRINT and look for the default gateway:

    Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0     172.16.153.2  172.16.153.130       10
    

    Usually this is the first line, but it is the one identified by destination 0.0.0.0.

    Add this entry to your hosts file at c:\windows\system32\drivers\etc on XP:

    172.16.153.2    localhost.local
    

    Then you can use the address http://localhost.local:3000/ instead of the arbitrary IP address. If you're using Passenger to run your applications, you can add additional lines for each entry defined by Passenger.

    0 讨论(0)
提交回复
热议问题