title: Jquery, prototype, mootools and rails 3 fancy uploader
body: <p>I'm using <strong>Rails 3.2.6</strong> and trying to integrate <a href="https://github.com/iwasrobbed/Rails3-S3-Uploader-FancyUploader" rel="nofollow">Rails S3 Fancy uploader</a> and I think it's probably a misunderstanding with how I'm using prototype, jquery, and mootools at the same time, or just migrating it to a newer version of rails.</p>
  
  <p>I've got jQuery in noconflict mode right after including the asset pipeline <em>(prototype.js &amp; mootools.js libraries are in the /assets/javascript folder, as well as all the source files for 'fancyuploader' similar to how the /public folder is oriented in the github repo)</em>:</p>
  
  <pre><code>&lt;%= javascript_include_tag "application" %&gt;
  &lt;script type="text/JavaScript&gt;
  jQuery.noConflict();
  &lt;/script&gt;
  </code></pre>
  
  <p>However, I am still getting a lot of undefined errors, and I think it has to do with the order the assets are being loaded onto the page.</p>
  
  <pre><code>Uncaught TypeError: Object [object Window] has no method 'addEvent' script.js:10
  Uncaught TypeError: Object [object Window] has no method 'addEvent' script.js:10
  Uncaught ReferenceError: Class is not defined FancyUpload2.js:15
  Uncaught ReferenceError: Class is not defined FancyUpload3.Attach.js:15
  Uncaught ReferenceError: Class is not defined FancyUpload3.S3Uploader.js:27
  Uncaught ReferenceError: Fx is not defined Fx.ProgressBar.js:13
  Uncaught ReferenceError: Swiff is not defined Swiff.Uploader.js:14
  Uncaught ReferenceError: Class is not defined Uploader.js:13
  Uncaught TypeError: Cannot read property '0' of undefined prototype.js:6719
  </code></pre>
  
  <p>It looks like mootools and prototype aren't available to the scripts required the create the 'FancyUploader'</p>
  
  <hr>
  
  <p>The project runs just fine in <strong>Rails 3.0.7</strong>, with the assets in a <em>public folder</em> and <em>haml</em> template engine in the source (I'm using erb, but this is a JS problem I think), however, I also noticed <em>prototype doesn't seem to be referenced</em> in the authors includes?? </p>
  
  <pre><code>= javascript_include_tag( 'mootools.js', 
                                'fancyupload/source/Fx.ProgressBar',
                                'fancyupload/source/Swiff.Uploader', 
                                'fancyupload/source/FancyUpload3.Attach', 
                                'fancyupload/source/FancyUpload3.S3Uploader' ) 
  </code></pre>