title: Rails_uis throw error when creating a new RailsApp
body: <p>After creating a new ruby 2.6 / rails6 app and 
  scaffolding the destroy popup is not working.</p>
  
  <p>Any idea whats wrong.. happens out of sudden..</p>
  
  <p>package.json</p>
  
  <pre><code>{
    "name": "untitled1",
    "private": true,
    "dependencies": {
    "@rails/actioncable": "^6.0.0-alpha",
    "@rails/activestorage": "^6.0.0-alpha",
    "@rails/ujs": "^6.0.0-alpha",
    "@rails/webpacker": "^4.0.6",
    "turbolinks": "^5.2.0",
  },
    "version": "0.1.0",
    "devDependencies": {
    "webpack-dev-server": "^3.5.1"
  }
  </code></pre>
  
  <p>}</p>
  
  <p>console shows this error:</p>
  
  <pre><code>rails-ujs.js:22 Uncaught TypeError: Cannot set property 'Rails' of undefined
  at rails-ujs.js:22
  at rails-ujs.js:37
  at rails-ujs.js:38
  at Module.&lt;anonymous&gt; (rails-ujs.js:822)
  at Module../node_modules/@rails/ujs/lib/assets/compiled/rails-ujs.js (rails-ujs.js:822)
  at __webpack_require__ (bootstrap:19)
  at Object../app/javascript/packs/application.js (application.js:6)
  at __webpack_require__ (bootstrap:19)
  at bootstrap:83
  at bootstrap:83
  </code></pre>