Tag Archives: lightbox

Rails 3.1 installing Lightbox Jquery plugin.

Download the plugin: http://leandrovieira.com/projects/jquery/lightbox/

In /vendor/assets

create a dir called javascript
and another called stylesheets. Move the lightbox.min.js to the newly created javascripts folder. and Lightbox.css to the stylesheets folder.


Add the file paths to application.js and application.css.  Note the order of how you enter them.

ex. application.js

//= require jquery
//= require jquery_ujs
//= require lightbox/lightbox

ex application.css

*= require_self
*= require lightbox/lightbox
*= require_tree .

Be sure to do config.serve_static_assets = true in production.rb so that assets will get served out of public/assets in production.

Run rake assets:clean followed by rake assets:precompile