-
Hi! First of all, thanks for this great library, and especially thanks for making it usable with Rails 4. You have made the lives of people who maintain Ruby on Rails project much more pleasant! We’re running into a problem where a deployment would fail at runtime due to missing Vite assets.
Related discussions:
We’re not using Capistrano to deploy our app; we use @cloud66. Upon further digging, we found that when deploying, the cache folder is shared between deployments. During deployment, Cloud66 performs this step:
(It seems that Cloud66 uses Capistrano under-the-hood, however we don’t have a Capfile or any mention of Capistrano in our source code.) Meanwhile, the
Since we don’t want to add Capistrano to our project yet (we plan to migrate to a Dockerized build), what we do is setting To make the process safer, maybe Vite Ruby can also check if the manifest file exists. That is, if the output manifest file (e.g. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi Thai! Ignoring the cache when the manifest is missing would prevent the error, sounds like a good idea! On the other hand, it will make it harder to realize that Vite Ruby is not reusing previously built assets. Perhaps a middle ground would be to log a warning then the cache key matches, but the manifest is missing. Let me think about it, thanks for bringing this up 😃 |
Beta Was this translation helpful? Give feedback.
-
Implemented in: Thanks for the suggestion Thai! 😃 |
Beta Was this translation helpful? Give feedback.
Implemented in:
Thanks for the suggestion Thai! 😃