We’ve just released version 0.4.0 of Pow, our zero-configuration web server for Rails development on OS X.
There are several new features in this release, including port proxying and better support for zsh users, but my favorite is a tiny addition that makes a huge difference when testing your apps on mobile devices.
Pow has always made it easy to access Rails apps on your computer with its built-in .dev
domain. Just symlink your app into the ~/.pow
directory and visit http://myapp.dev/
in your browser.
But what about testing your apps on mobile devices, or in IE? Pow’s .dev
domain only works on your local machine.
Until now, testing on other computers required modifying /etc/hosts
or setting up a custom DNS server on your router. Now we’ve fixed that, too.
Introducing xip.io, the magic domain name
Pow 0.4.0 has built-in support for xip.io, a free service from 37signals that provides wildcard DNS for any IP address.
With xip.io you can access your Rails apps from devices on your local network, like iPads, iPhones, Windows VMs, and other computers. No configuration required.
Say your development computer’s LAN IP address is 10.0.0.1. With the new version of Pow, you can now access your app at http://myapp.10.0.0.1.xip.io/
. And xip.io supports wildcard DNS, so any and all subdomains of 10.0.0.1.xip.io
resolve too.
Read more about xip.io at http://xip.io/ or check out the full source code on GitHub.
Installing and upgrading
See the full 0.4.0 release notes and install or upgrade with one simple command from your terminal:
curl get.pow.cx | sh
As always, the user’s manual and annotated source code are available for your perusal.
Wim
on 07 Jun 12This is really great. I was developing today and at one point I wanted to test on my iPad. This timing couldn’t be better.
andy
on 07 Jun 12Is pow still mac-only? Any intention to provide linux/ubuntu support?
Mario Uher
on 07 Jun 12Wow, thank you for xip.io! Where is the Flattr button?
Vincent
on 07 Jun 12Such an elegant solution. I love it!
Oleg Bovykin
on 07 Jun 12xip.io is really awesome!
Ken Collins
on 07 Jun 12Amazing, when given the “valid” oppurtunity to use a blink tag for the cursor on xip.io, you still do it right with CSS instead. Kudos!
Ape
on 07 Jun 12I’m curious about how to go about setting up a .dev domain on my local network. What would I look for to see if such a thing is available in my router?
I know how to do it on the Fortinet(s) I work with at work, but not with any run of the mill router.
NL
on 07 Jun 12@Ape – I’m using dnsmasq to accomplish routing *.dev to my desktop. Many routers come with it optionally enabled (I use a router running DD-WRT).
Ape
on 07 Jun 12@NL – Thanks! Looks like I have a project for this weekend. Up until now, I haven’t had a good reason to get around to running DD-WRT.
dnsmasq looks way easier to get going than setting up a windows server. I’ve been setting the hosts file by hand on my machines, but its a pain in the butt to sychronize (and doesn’t work on all the phones i’m testing with).
It looks like it would work really well as part of a VM farm too, no sense hitting an outside DNS if the machine is located on the same host.
Jared
on 08 Jun 12This looks really awesome! Thanks for publishing this, I needed to solve this exact problem.
One quick question; isn’t the paradigm of
curl get.pow.io | sh
a bit irresponsible? If you’re copy/pasting, it’s not hard to copy paste two or three lines to download a .sh file and compare md5 checksums. Hijacking the DNS for pow.io and pointing it to another script would be a great way to install malware on developer machines.
I may be overreacting in the wake of several exploited websites (LinkedIn, CloudFlare), but it seems like developers should be promoting best practices, like not just piping some random script to sh.
Lonny Eachus
on 08 Jun 12Seems like a gigantic kludge, just to get that little bit of functionality. Really… I’m supposed to use a Web service (free or not) just to access a server on my own internal network?
That’s kind of like relaying a call through England in order to talk to your next-door-neighbor in Phoenix.
I’ll pass on the xip.io thing. Thanks anyway.
Lonny Eachus
on 08 Jun 12Seems like a gigantic kludge, just to get that little bit of functionality. Really… I’m supposed to use a Web service (free or not) just to access a server on my own internal network?
That’s kind of like relaying a call through England in order to talk to your next-door-neighbor in Phoenix.
I’ll pass on the xip.io thing. Thanks anyway.
Kishor Gurtu
on 08 Jun 12I’m guessing this doesn’t work with IPv6?
Erich Menge
on 08 Jun 12Great, thanks Sam! Looks like a couple of really nice new features. I’ll for sure be making use of the xip.io service.
@Lonny I don’t see how it is a kludge. Of course you could setup your own DNS to do the same thing. I for one have enough crap running on my Mac that I’m glad to use someone else’s DNS server.
Peter Cooper
on 08 Jun 12Friendly feature idea for future: If all non IPed xip.io hostnames resolved to 127.0.0.1, that’d solve the problem for the majority of developers. So, for example, myapp.dev.xip.io or anything.whatever.xip.io could just resolve to 127.0.0.1 by default.
Lonny Eachus
on 08 Jun 12@Erich
The “access a POW server from a different machine” question has been around for a long time, and last time I searched the ‘Net, there were no satisfactory answers readily available. So if it’s so easy to set it up locally, I’d really like to know how. Maybe there’s a link you could pass on?
On the other hand, the xip.io solution just seems a vast workaround to me. Shooting an ant with a cannon, as it were. But that’s just my opinion. I wasn’t trying to criticize, just saying that it doesn’t appear to really solve any issues for me.
Brian
on 08 Jun 12I love the xip.io support! And it’s easy to hack ActionDispatch::Request so that “www.myapp.127.0.0.1.xip.io” is converted to “www.myapp.dev” so subdomains work right.
https://gist.github.com/2893933
Johnny Hall
on 08 Jun 12Hi. Thanks for this – it definitely solves a problem I’m having with pow.
Is anyone else using it and finding it monumentally slow? I wonder if there’s anything I can do to speed it up.
I’d also be interested in more details about how to set up DNS locally so that this isn’t necessary.
Johnny Hall
on 08 Jun 12Ignore my last comment about it being slow – it’s not slow. My local memcached instance was off! Idiot alert.
Romain
on 08 Jun 12@Pete
For domains resolving to 127.0.0.1, there’s lvh.me and lvh.me.uk. They support subdomains.
Troy Murray
on 08 Jun 12Rock on you guys (and gals)!
Jens Alfke
on 08 Jun 12I’m trying hard to figure out how “http://10.0.0.1.xip.io” has any advantage as a URL over “http://10.0.0.1”. It’s longer, harder to remember, involves a DNS query instead of resolving immediately to an IP address, and breaks if your server goes down.
What am I missing here?
Rzah
on 09 Jun 12@Jens
I’ve been reading and thinking the exact same thing, everyone knows the IP address alone works right?
Jamis
on 09 Jun 12@Jens and @Rzah, you’re right that if all you need is the IP, that’s fine. It breaks down, though, when you have multiple apps at the same IP address (multiple virtual hosts), or if you have an app that uses subdomains to differentiate views (e.g. different accounts). When either of those are true, xip.io is quite handy, because it also resolves “http://foo.10.0.0.1.xip.io” and even “http://subdomain.foo.10.0.0.1.xip.io”. And as Sam mentioned, Pow works with these xip.io urls, and forwards requests to the appropriate virtual host.
Aaron Neville
on 09 Jun 12Apple’s Bonjour fits the bill for my work fine. Reasons: • Don’t have to look up my IP address on whatever network I connect to so I’m free to use DHCP with any router • Easy enough to install on the versions of Windows that people use (use Bonjour for Printing) • Works automagically on Macs and iOS
Derek
on 09 Jun 12Looks like a great piece of kit for getting up and running with Rails development quickly, now if only there was a version of this for windows :( (Here’s hoping the missus will let me get a shiny new Mac next Christmas)
Simon
on 11 Jun 12Nice job guys! The previous pow.cx was awesome, now it’s just gotten more awesome :) It makes Rails dev sooooo easy, love it!
william
on 11 Jun 12Get another interest in life losers
Jonny N
on 11 Jun 12+1 for xop.io ;)
william
on 12 Jun 12“Here’s hoping the missus will let me get a shiny new Mac next Christmas” Hahahahahahahahaha, you got to be joking
william
on 12 Jun 12sorry about that Derek
lomaxx
on 12 Jun 12Is it just me, or is this just a clone of http://readme.localtest.me/
Chim
on 14 Jun 12Can somebody tell me how to use xip.io step by step?
Do I have to install xip.io somewhere or I just have to point the url in browser like this:
http://mydev.dev.ipaddress.xip.io ?
I have no idea how it works.
chrux
on 14 Jun 12http://readme.localtest.me/ ->similar, but this is better, that is just for localhost, and in this, your ip can mapped.
This discussion is closed.