Since Rails 6, the javascript content is not handle pas sprocket (app/asset/javasript) but by webpacker (app/javascript). The Stimulus controllers are installed in /app/javasript/controllers/ by default.
The coffescript gem is useless in these circumstances. You need to install Coffeescript with Webpacker. You also need to edit /app/javascript/controllers/index.js to handle the context in such a way it accepts .coffe file as well.
And even then, I am not sure that will work.