Simon Kiteley PRO said about 3 years ago on Referencing Stimulus controllers in a gem :
Just looked at episode 206... that will do me well. I suppose if I need a gem, for concerns etc, I can make it so you include the bits needed to get the javascript. Do something like add the appropriate lines to the /app/javascript/packs/application.js file etc.