Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 7.0.0 #193

Open
ycrepeau opened this issue Dec 27, 2021 · 4 comments
Open

Rails 7.0.0 #193

ycrepeau opened this issue Dec 27, 2021 · 4 comments

Comments

@ycrepeau
Copy link

I try to use liveReload with Ruby on Rails 7.0.0.

My setup uses ESLint to build javascript files and Dart-Sass to build CSS.

When I make a change, I have the following error:

ActionController::RoutingError (No route matches [GET] "/assets/application-090693f45d6e8ea045507ca09df6efea3dc2c4945b052a9d736eff8568624547.css")

The right file to reload is /app/assets/builds/application.css and application.js.

The Procfile.dev is as follow:

web: bin/rails server -p 3000
js: yarn build --watch
css: yarn build:css --watch
guard: bundle exec guard
@jacobjlevine
Copy link

jacobjlevine commented Oct 27, 2022

I'm experiencing a similar issue with Ruby 3.1.2, Rails 7.0.3.1, sass 3.4.25, and sass-rails 6.0.0.

Update: it appears the page is trying to load /assets/application.debug-4a08cbf5fcaa2faf40a8d8c1f5ad03d3acf1dfbc8596ea5a12c759e2fc620dad.css?livereload=1666890377001. When I try manually removing the livereload URL param, the file loads fine.

@jacobjlevine
Copy link

jacobjlevine commented Oct 27, 2022

Might be a sprockets 4 issue? Found some interesting insights here: https://lightrun.com/answers/guard-guard-livereload-not-reloading-css-correctly-with-configassetsdebug--false. Fixed the issue for me by setting config.assets.digest = false in my development.rb file.

@inspire22
Copy link

Thanks, config.assets.digest = false solved it for me as well.

@ItaloCobains
Copy link

I had a similar problem, but in this case it was in application.css and in some assets. To resolve this, delete all cache and pre-compiled assets, which I ended up doing by mistake and I also noticed that whenever I transpiled the javascript after the css, it also gave this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants