Jquery-rails upgrade breaking existing code which depends on older versions of jQuery Core (1.8.2)

How do you manage different scripts that need different versions of
to work properly?

I used to be able to use No Conflict even though it was kinda messy too.
But at least I could get all the scripts working without one breaking
other due to different jQuery Core dependencies.

Like this: http://youmightnotneedjquery.com/


You might want to use $.noConflict() as shown in this stackoverflow

On Tue, Mar 18, 2014 at 6:44 PM, Walter Lee D.
[email protected]wrote:

But at least I could get all the scripts working without one breaking the

To view this discussion on the web visit
To view this discussion on the web visit


For more options, visit https://groups.google.com/d/optout.

Abdulsattar Mohammed

So I tried noConflict but it didn’t work.

<script src="http://code.jquery.com/jquery-1.8.2.min.js"


Then inside* jquery.inlineedit.js*:

(function($) {

// define inlineEdit method
$.fn.inlineEdit = function(options) {


Not sure why it doesn’t work! Can’t do inline edit where it used to

I see… what about jQuery UI and jQuery Ujs which depends on those
jQuery Core? How would I adapt those versions with noConflict?

Thought I’d share how I got it all working in the Asset Pipeline.

//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require bootstrap-modalmanager
//= require bootstrap-modal
//= require jquery.easing
//= require jquery.cookie
//= require zeroclipboard
//= require jquery-1.9.0.min
//= require noconflict.jquery-1.9.0
//= require toggles
//= require jquery-1.10.1.min
//= require noconflict.jquery-1.10.1
//= require jquery.joyride-2.1
//= require jquery-1.7.2.min
//= require jquery-ui-1.8.7.custom.min
//= require noconflict.jquery-1.7.2
//= require jquery.inlineedit
//= require pubsub
//= require base

Got this fixed.

Basically I put ‘$.fn.jquery’ inside each scripts after NoConflict block
check the version and made sure the 1.8.2 version came through to them.