When you delve into setting up your rails application.manifest for offline caching your iPhone mobile HTML5 app you will stumble upon rack-offline from wycats. Great tool and here I show you to get it up running quickly.
In your routes.rb file you put in a block and syntax like this:
Yourapp::Application.routes.draw do offline = Rack::Offline.configure do
cache "index.html"
cache "assets/kassa.css"
cache "assets/background.png"
cache "assets/mobile.js"
network "/"
end match "/application.manifest" => offline
In your application.html.erb (or whatever file you serve as a mobile starting page) you extend the HTML tag:
The rack-offline gem was released before all this rails 3.1 asset pipline beauty. It was featured in Episode 248 of Railscasts: Offline Apps.
If you are on Rails 3.1 you are probably going wild with sass & scss and coffeescript and love the flexible syntax. So an extra step to compile your app for offline caching for a mobile html5 app can be quite a pain. So you will want a setup where you can set this up once and more or less forget about it. In production the caching should always be working but in development you will want to see the changes to your code without switching off the application.manifest all the time. I found that the rack-offline gem docs were not so clear how to set it up, and tore my hair outs for half an hour.
Hope this saves you some time. Also watch Ryan Bates Screencast.