I tried this exact approach to create a new Rails 7 app in How to install jQuery and bootstrap in rails 7 app using esbuild (without webpacker) , but now it seems like my rails app is just ignoring javascript all together - no errors, but no javascript running either (if I add a console log or alert, nothing happens, or introduce bugs in the existing js, no errors are reported - it’s as if the “JavaScript” folder doesn’t exist). I didn’t make any changes to the default created app. If I try creating a new app without esbuild, then I do have javascript working (executing), but then of course i have the issue I was originally trying to solve with esbuild of getting jquery to work. Any thoughts please on what I could be missing?
Asked
Active
Viewed 1,067 times
1 Answers
1
Wow - it had to be something. I was still using rails server instead of ./bin/dev - making that switch fixed it.

Navin Gupta
- 354
- 3
- 5