Closed
Description
I have a Rails application that was upgraded from Rails 7 to Rails 8 and uses Sprockets as the asset pipeline. When I just add hotwire-spark
to the Gemfile I get the following error after bundling and restarting the Rails sever:
Asset `hotwire_spark.js` was not declared to be precompiled in production.
Declare links to your assets in `app/assets/config/manifest.js`.
//= link hotwire_spark.js
and restart your server
I followed the instructions and thought everything would be fine. But that won't work in the test or production environment when the gem is only added to the development
group in the Gemfile.
Is this gem not compatible with Sprockets?