jQuery-ui on rails 3.1 assets pipeline

10/10/2011

UPDATE: There is a gem jquery-ui-themes perfectly fix this, recommend to use this gem.

The following will fix the jQuery-ui theme’s issue on Rails 3.1, tested in production

  1. Add this line to app/assets/stylesheets/application.css

     *= require vendor
    
  2. create vendor/assets/stylesheets/vendor.css with

     /*
     *= require_tree ./jquery_ui 
     *
     */
    
  3. Put the jQuery-ui in vendor folder

     vendor
       └── assets
             └── stylesheets
                  ├── images
                  │   ├── ui-bg_flat_0_aaaaaa_40x100.png
                  │   ├── ...
                  ├── jquery_ui
                  │   └── jquery-ui-1.8.16.custom.css
                  └── vendor.css
    

The ugly way, but it just worked.

blog comments powered by Disqus