I am using Rails 3.2 and the jquery-ui-rails plugin to add datepicker to the JS manifest file.
This is my manifest file:
//= require jquery_ujs //= require jquery.ui.datepicker //= require_tree .
I get my jQuery library separate from the Google CDN.
However, by adding jquery.ui to the manifest file, it automatically includes its jQuery dependency, so now I end up with two jQueries in my final HTML document.
I don't need this additional jQuery file - I only need one from the Google CDN. Using asterisks, I can use the stub directive to selectively "exclude" the jQuery file.
So this is what I did - and it didn't work - i.e. jQuery is still being added to my last js file ...
//= stub jquery //= require jquery_ujs //= require jquery.ui.datepicker //= require_tree .
I tried several combinations:
//= stub jquery.js //= stub "jquery" //= stub "jquery.js" //= stub "/jquery.js"
etc.
But none of these works. I could not find an example wherever he worked. By the way, I also tried
What did not close the jquery_ujs library ...
Joerg source share