Skip to content
A gem to automate using jQuery with Rails
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This gem adds a single generator to Rails 3, jquery:install. Running the generator will remove any Prototype JS files you may happen to have, fetch jQuery and the jQuery-ujs driver for Rails, and (optionally) fetch jQuery UI.

The gem will also hook into the Rails configuration process, removing Prototype and adding jQuery to the javascript files included by the javascript_tag(:default) call. While the plugin downloads minified and un-minified versions of jQuery and jQuery UI, only the minified versions are included in :default.


In your Gemfile, add this line:

gem "jquery-rails"

Then, run bundle install. To invoke the generator, run:

rails generate jquery:install

You're done! Don't forget to output csrf_meta_tag somewhere inside your <head> tag in your layout!

Something went wrong with that request. Please try again.