I am trying to update a Rails 3 app to Rails 6 and I have problems with the now default webpacker since my Javascript functions are not accessible.  I get: ReferenceError: Can't find variable: functionName for all js function triggers.  What I di...
I'm a bit stumped. My local rails app works great with webpacker 4.2 and react, but when deploying to production gives me the wonderful can't find application in /app/public/packs/manifest.json error.  Here's what I've tried:   Tried...
This a continuation of a related problem that @rossta fixed part of, but now the problem is moved so thought I'd start over.  No errors and the script is completing (verified by console.log outputs in the script). The body element shows up. This...
I know its simple but with update of rails 6. there is new syntax in rails 6 for manage javascript assets which is maintained by webpacker.  //application.js require("@rails/ujs") //.start() require("turbolinks").start() require("...
I'm trying to use the JS routes gem with webpacker from Rails 5.1 but can't figure out how to include the js-routes.js.erb in webpack's app/javascript/packs/application.js.  import 'js-routes'  leads to   Uncaught Error: Cannot fi...
So I've migrated my Rails application over to Webpack but I'm having trouble loading image assets. In the Webpacker documentation it states that I can load my assets using the following:  <img src="<%= asset_pack_path 'images/lo...
With the arrival of Webpacker to Ruby On Rails I can't find a way to use my Javascript functions.  I have a file called app-globals.js with a function to test:  function alerts () {     alert ("TEST") }   Then I want to use it in one of m...
I'm trying to simply load assets (fonts/images) into a Rails project using Webpacker. It's proven to be hilariously more difficult than it should be.  I'm using React on Rails 11.0.4, Rails 5.1.6, and Webpacker 3.5.3.  I've tried crea...
I want to add the cropper functionality using the data modal, but I could not even select the file from the data modal. I tried using the yarn install command and webpacker but javascript is not adding to the corresponding page....
I am using the webpacker gem (version 4.0.7) for a Rails 6 RC2 app, and I am also using serviceworker-rails middleware gem (version 0.6.0) to integrate Service Worker with Rails.   Now, I want to create a serviceworker.js pack file (which I copied ov...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.