Topic: Removing conflicting prototype

When I was moving my site from development mode to production mode I noticed that the server at the webhost had 3.0.10 and I had 3.1.1, so I started change the project files to match 3.0.10. But when I was finished it still didn't work so I contacted support, who notified me that they upgraded the server to 3.1.1. So then I had to change back the project files manually to match 3.1.1 again. But it seems like prototype is still running and it conflicts with jQuery, which gives me this error msg:

Uncaught controls.js requires including script.aculo.us' effects.js library
/#about:30Uncaught TypeError: Object [object Object] has no method 'cycle'
/#about:12Uncaught TypeError: Object [object Object] has no method 'cycle'

So my question is: How do I remove prototype? Or atleast prevents it from conflicting?

Tried jQuery.noConflict(), but it doesn't work..

Re: Removing conflicting prototype

What does your app/assets/javascripts/application.js look like?

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.

Re: Removing conflicting prototype

This is how it looks like:


// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require_tree

Re: Removing conflicting prototype

//= require_tree .

That dot is needed on 3.1.X,  but the entire line is only needed  if you have OTHER javascript in app/assets/javascripts

What is the contents of app/assets/javascripts, besides the manifest application.js?

The // require_tree . line will include any js in app/assets/javascripts,  it looks like you have some prototype related js files there,  just remove them if you don't need them.

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.

Re: Removing conflicting prototype

Ah, I just missed the dot.
The content is 3 different jQuery libraries that i use and the application.js ofc.
There isn't any other js-files, but there was and I deleted them. But I'm not sure if I did another precompilation after that, I'll try that.

Re: Removing conflicting prototype

Haha, incredible.. How could I forget to precompile! It works perfectly now smile
Thank you for the help smile

Re: Removing conflicting prototype

Yea, always precomile if you rearrange stuff in app/assets/javascripts,  It fixed a problem for me early on when I started using assets pipeline,  so now it's a habit!  I'm not sure of the exact reason,  but I didn't care,  and it doesn't take that much time.

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.