Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Easily add mobile support to your Rails app
branch: master

A gem to easily add mobile support to your Rails app!

To install

gem install jquery-mobile-rails

or in Gemfile

gem 'jquery-mobile-rails'


You will have access to a mobile? method in your controllers and layouts that will be true when a mobile devise visits the app. In your controller, add:

<% if mobile? %>
<%= stylesheet_link_tag "" %><%= javascript_include_tag "" %>
<% end %>

Note, you want to have your custom JS code included before the jQueryMobile JS file, so that it can fire the mobileinit hooks you set up (see

Something went wrong with that request. Please try again.