Access a Local Sinatra App from iPad/iPhone
If you are developing a Rack application locally it's nice to be able to easily test a variety of devices. But if you try to connect via your local IP address, you will find that is doesn't work because by default Rack binds to localhost. In order to accept external connections we need to make Rack bind to 0.0.0.0 instead. You can do this with:
bundle exec rackup --host 0.0.0.0 --port 8080
You can find your local IP address from the OS X System Preferences > Network.
You can now connect from an external device using http://YOUR_IP:8080, e.g. http://10.0.1.14:8080