Load jQuery from CDN in production and use local copy in development. jQuery CDN supports Ruby on Rails, Sinatra ans other non-Rails environments with Sprockets.

Another gem jquery-rails contain also UJS adapter for jQuery. So it need to test any jQuery updates and release new jQuery version after few month (for example, there is still no jQuery 2 for jquery-ujs ). If you don’t need UJS, this gem will be better to you.

jQuery CDN now has 2 branches: with jQuery 2.x and 1.x.

Main features:

Load from CDN

Latest version of jQuery

Gem version is same that jQuery

Sinatra and plain Ruby support



Multiple CDNs support

Application environment support

Gem page on GitHub