Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 vendor
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 LICENSE
Octocat-spinner-32 Rakefile
Octocat-spinner-32 canjs-rails.gemspec


CanJS for Rails!

This gem provides:

  • can.js 2.0.0 for jQuery (including all plugins)

This gem requires the asset pipeline, so it should work with Rails 3.1 or later. The version of CanJS included with this gem (can.jquery) requires jQuery, conveniently Rails 3.1 and later includes jquery-rails by default, so you won't need to explicitly install jQuery. However, if you aren't using jquery-rails make sure you install jQuery and require it before can.jquery in your app/assets/javascripts/application.js.


Add the canjs-rails gem to your Gemfile.

gem "canjs-rails"

And run bundle install.

Rails 3.1 or greater (with asset pipeline enabled)

To make the core CanJS library available add these lines to app/assets/javascripts/application.js:

//= require can.jquery

You're done!


Many thanks are due to the jquery-rails project as it was used as the basis for this gem.

Copyright Craig Wickesser, released under the MIT License.

Something went wrong with that request. Please try again.