title: Rails 5.2: Issue with jquery-rails
body: <p>I am developing Rails 5.2 application, and everything works fine under development mode. The main focus is the javascript manifest.</p>
  
  <p><code>app/assets/javacripts/application.js</code></p>
  
  <pre><code>//= require rails-ujs
  //= require jquery3
  //= require activestorage
  //= require turbolinks
  //= require_tree .
  </code></pre>
  
  <p>And the jquery-rails is already included: <code>gem 'jquery-rails'</code></p>
  
  <p>The jquery from manifest works fine during development, but when I deploy to production with <code>RAILS_ENV=production</code>, the debug console throws me an error.</p>
  
  <pre><code>Uncaught TypeError: wt.each is not a function
      at application-f391c00e32925e724aeeeafb89a9def5fe54c457b371cab55c13d97dc54382cd.js:formatted:789
      at application-f391c00e32925e724aeeeafb89a9def5fe54c457b371cab55c13d97dc54382cd.js:formatted:9
      at application-f391c00e32925e724aeeeafb89a9def5fe54c457b371cab55c13d97dc54382cd.js:formatted:10
  </code></pre>
  
  <p>Sometimes it is given as <code>xt</code>:</p>
  
  <pre><code>Uncaught TypeError: xt.each is not a function
      at application-01f2edddc7a85d2c9e116d47f0c8eb10e41b5d6a06d8832122e5545bb2d1068f.js:formatted:1340
      at application-01f2edddc7a85d2c9e116d47f0c8eb10e41b5d6a06d8832122e5545bb2d1068f.js:formatted:559
      at application-01f2edddc7a85d2c9e116d47f0c8eb10e41b5d6a06d8832122e5545bb2d1068f.js:formatted:560
  </code></pre>
  
  <p>and the error leads to this line of code:</p>
  
  <pre><code>wt.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function(t, e) {
      ht["[object " + e + "]"] = e.toLowerCase()
  });
  </code></pre>
  
  <p>But when I checked the original Jquery code, it's not <code>wt</code> (or sometimes <code>xt</code>), but <code>w</code>:</p>
  
  <pre><code>w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" ") 
  // The code goes on
  </code></pre>
  
  <p>I suspect that Rails did some changing behind the scene, and how can I fix this?</p>
  
  <p>Here are some things that I have tried:</p>
  
  <ol>
  <li><p>Use assets from <code>public</code> folder the standard way: [Works Fine]</p></li>
  <li><p>Use other version of jquery, i.e., <code>jquery</code>, <code>jquery2</code>, <code>jquery3</code>: [Not Working]</p></li>
  </ol>
  
  <p>Currently I am using method <code>1</code> above as current workaround, but my project is not organized such way.</p>
  
  <p>Thank you in advance</p>