Question

This seems quite trivial but couldnt find it in the forums or rails asset pipeline guides.

In short

How can I inform sprockets to skip the asset pipeline for the jquery ui css of the 'jquery-rails' gem.

In long:

I am trying to use 'jquery-rails' gems with the Google jquery CDN's.

Hence in the I am just including the jquery_ujs and adding the jquery related scripts in the application layout:

application.js.erb:

//= require bootstrap-twipsy.js
//= require jquery-glowing
//= require jquery_ujs

application.html.erb:

= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"
= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jqueryui.min.js"

For the css', I am not including the jquery-ui css in the application.css and adding it in the layouts file too.

application.css.scss.erb:

 *= require_directory .
 *= require active_scaffold
 *= require_self

In production environment, the compiled css file includes the jquery-css code too, since its in the assets pipeline of the 'jquery-rails' gem.

So how can I inform sprockets to skip the asset pipeline for the jquery ui css of the 'jquery-rails' gem.


If this is not possible in rails, what is the best way to handle this sittuation.

I thought about removing the jquery-rails gem, and adding the jquery_ujs javascript manually to the system, but then I have to deal with the installation of new releases rather than executing a simple 'bundle update'

Thanks in advance,

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top