Just run into the same problem,
Not sure if its the right approach or not, but what i did to make it work was to
move the javascript folder to the assets folder, then in "assets/config/manifest.js " file added this:
Its 2 dots before /javascript
2 dots mean folder that is one level higher than the current folder.
If you are using VScode you can copy relative path by just right clicking the file whose path you want.
//= link_tree ../images
//= link_tree ../../javascript .js
//= link_tree ../../../vendor/javascript .js
//= link frontend.js
//= link frontend.css
//= link admin.css
//= link admin.js
//= link dashboard/application.css
//= link dashboard/application.js
So, you have to navigate to root folder of your app, and run manually this instruction, but specifying the application.js like this: ./app/javascript/application.js