rails / cssbundling-rails

Bundle and process CSS in Rails with Tailwind, PostCSS, and Sass via Node.js.
MIT License
579 stars 83 forks source link

Setting writing permissions for builds directory #40

Closed leoplct closed 2 years ago

leoplct commented 2 years ago

We use Cloud66 for deployment and the asset:precompile fails (silently) because we need to correctly set writing permission when the rake css:build is done. How could we set those permissions as stated in this doc? We would need to set before running the rake task.

https://help.cloud66.com/rails/how-to-guides/deployment/setting-write-permissions.html#setting-permissions-for-your-writable-directory

dhh commented 2 years ago

css:build points at app/assets/builds, so you can set write permissions for that directory, and you should be fine.

leoplct commented 2 years ago

I found removing this line from .gitignore solved the issue /app/assets/builds

So, the final .gitignore should be

/app/assets/builds/*
!/app/assets/builds/.keep

This allows to create the /app/assets/builds after checkout and so it gives writing permissions by default.