Skip to content
By Sebastian Porto

Testing your Rails Application in Internet Explorer

When developing a Rails application is quite common to do it using MacOS. But at some point you will probably test that your application works well in different versions of Internet Explorer. This blog post explains a way to achieve this easily.

Use Pow on Mac

Pow makes really easy to spin a Rails application on Mac. The easiest way to install Pow is using the powder gem.

    gem install powder
    powder install

Then in your project directory run:

    powder link

After this you should be able to access your application in your browser without doing anything else. For example, if your application directory is called "blog", your application will be available at "blog.dev".

Set your computer local IP address as static

You will need to make the IP address of your computer in your local network static, so it doesn't change every time you connect to your network (e.g. restart).

Go to Setting > Network. Click on the Advance button, in the drop down Configure IPv4 you should select Using DHCP with manual address or Manually.

An example setup will be to select Using DHCP with manual address and adding your desired IP address in the IPv4 Address field. For example if your Subnet Mask is 255.255.255.0 and your router is in 192.168.0.1 you could add 192.168.0.105 as your computer IP address. The last number is up to you as long as it is not used by another device on your local network.

Install a Windows Virtual Machine

Once you have your app running using Pow the next step is to install a virtual machine with Windows on it.

Thankfully Microsoft offers a bunch of testing VMs so you don't have to pay for a license of Windows. Go here and download a virtual machine that suits your needs, e.g. VMWare Fusion Mac / IE9 - Win7. Virtual Box is free.

Install the virtual machine and run it.

Accessing your development site the easy way

You can use xip.io to access your development application directly. For example if your application is accessible using Pow at blog.dev and your machine IP is 192.168.0.105 you would access your site using:

blog.192.168.0.105.xip.io

These should work out of the box when using Pow, however it is a bit slow as each request is doing a trip all the way to xip.io and coming back. A faster alternative is to modify the Windows hostfile.

Editing the Windows Host files

In order to have access to your application you will need to tell Internet Explorer how to find it, you will do this by editing a file called hostfile on your Window virtual machine.

If you are using Windows XP, Vista, 7 or 8 (32bit) you will find the hostfile in

c:\Windows\system32\drivers\etc

You will need administrator access to edit this file. Open this file using Notepad and add the following line at the end:

[you.dev.ip.address]    [your_project.dev]

So for example if my development Mac has IP 192.168.0.105 and my application if running at blog.dev with Pow, I will add:

192.168.0.105    blog.dev

Save the file.

Running it

Simply open IE and type your application Pow address as inserted in the hostfile (e.g. blog.dev). That should be it. You now will be able to access your Rails application from within Windows for testing it.

Latest Articles by Our Team

Our expert team of designers and developers love what the do and enjoy sharing their knowledge with the world.

We Hire Only the Best

reinteractive is Australia’s largest dedicated Ruby on Rails development company. We don’t cut corners and we know what we are doing.

We are an organisation made up of amazing individuals and we take pride in our team. We are 100% remote work enabling us to choose the best talent no matter which part of the country they live in. reinteractive is dedicated to making it a great place for any developer to work.

Free Community Workshops

We created the Ruby on Rails InstallFest and Ruby on Rails Development Hub to help introduce new people to software development and to help existing developers hone their skills. These workshops provide invaluable mentorship to train developers, addressing key skills shortages in the industry. Software development is a great career choice for all ages and these events help you get started and skilled up.

  • Webinars

    Webinars

    Webinars are our online portal for tips, tricks and lessons learned in everything we do. Make the most of this free resource to help you become a better developer.

    Learn more about webinars

  • Installfest

    Installfest

    The Ruby on Rails Installfest includes a full setup of your development environment and step-by-step instructions on how to build your first app hosted on Heroku. Over 1,800 attendees to date and counting.

    Learn more about Installfest

  • Development Hub

    Development Hub

    The Ruby on Rails Development Hub is a monthly event where you will get the chance to spend time with our team and others in the community to improve and hone your Ruby on Rails skills.

    Learn more about Development Hub

Get the “reinteractive Review” Monthly Email