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 5.1 & webpacker require clearing cache before every deploy #562

Closed
flybayer opened this issue May 10, 2017 · 4 comments
Closed

Rails 5.1 & webpacker require clearing cache before every deploy #562

flybayer opened this issue May 10, 2017 · 4 comments

Comments

@flybayer
Copy link

A deploy will fail to on assets:precompile without any errors in STDOUT or the build log.

remote:        Webpacker is installed 🎉 🍰
remote:        Using /tmp/build_c3975d9e573c1bf0b4e6b532daa48fde/config/webpack/paths.yml file for setting up webpack paths
remote:        Compiling webpacker assets 🎉
remote:  !
remote:  !     Precompiling assets failed.
remote:  !
remote:  !     Push rejected, failed to compile Ruby app.
remote: 
remote:  !     Push failed
remote: Verifying deploy....
remote: 
remote: !	Push rejected to [my app].

Workaround

Run heroku repo:purge_cache -a [app] before every deploy

See #561 for more history

/cc @hone

@Zeneixe
Copy link

Zeneixe commented May 15, 2017

We're having the same issue

@schneems
Copy link
Contributor

Can you open up issues help.heroku.com search for "Rails 5.1 & webpacker require clearing cache before every deploy", so that I can look at your app?

Right now I've got no idea why this is happening. I've seen a few apps with with this reported, but no definitive causes or solutions yet. I opened rails/webpacker#395 an I'm exploring ways to get more debug output with the command.

@flybayer
Copy link
Author

@schneems I'm actually using this with dokku instead of Heroku

@flybayer
Copy link
Author

Update: node-sass was my problem even though there was no logging indicating this.

Adding

"postinstall": "npm rebuild node-sass"

to my package.json scripts as suggested in rails/webpacker#395 has fixed all my deployment problems.

I no longer need to clear the cache before every deploy.

@schneems schneems closed this as completed Oct 6, 2023
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

3 participants