Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Use FancyBox with Rails 3.1

tag: v0.1.0

Fetching latest commit…

Cannot retrieve the latest commit at this time


Use fancybox with rails 3.1 asset pipeline.


This gem vendors jquery fancybox for Rails 3.1 and greater. The files will be added to the asset pipeline and available for you to use.

First add the following lines to your applications Gemfile:

gem 'jquery-rails'
gem 'fancybox-rails'

Then run bundle install to update your application's bundle.

Now you need to edit your app/assets/javascripts/application.js file and add the following line:

//= require fancybox

And then edit your app/assets/stylesheets/application.css file to look something like:

 *= require_self
 *= require fancybox
 *= require_tree .

That's it!


With the gem installed and included in your asset manifests, you can now use fancybox as you normally would.

jQuery(function() {
Something went wrong with that request. Please try again.