administrate-field-active_storage
administrate-field-active_storage copied to clipboard
Images not showing in production.
Hi.
I was trying to deploy Rails 7 Tailwind app using Dokku, but build was getting error:
SassC::SyntaxError: Error: Function rgb is missing argument $green. on line 1 of stdin >> en-700{--tw-border-opacity:1;border-color:rgb(21 128 61/var
So I had to use fork of Administrate gem which fixes this issue:
https://github.com/thoughtbot/administrate/pull/2116
Now app is deploying like it should, but images in /admin section are not displayed
This exactly image is displayed on frontend though:
be so kind to give me a hint, maybe I forgot something or misunderstood. Thanks.
sorry for taking too long to respond, honestly it works fine with me maybe your configuration is incorrect? honestly looks like a sass issue. what does the network call tell you?
sorry for taking too long to respond
Hi! it's okay.
As far I understand I can't use sass at all, because I use Tailwind and I need Stimulus.
Is sassc is present I can't deploy: SassC::SyntaxError: Error: Function rgb is missing argument $green
If I use fork of Administrate where SassC is removed - Stimulus not working, because of the bug with date-picker
.
There is a fork where date-picker bug is fixed, but it still depends on SassC, so I can't deploy again 😄 vicious circle.
@czepesch haha reminds me when we first adopted flutter v2 and dart turned null safety on. Took months for all the libraries to get updated.
From the looks of it the issue isn't from our gem as it simply shows the image without any sass, just a simple css file that makes it look tidy
I think the issue is with adminstrate itself
If you can post a sample project I might be able to help more 🙏🏻
@Dreamersoul yes, repo is public, you can look at it: https://github.com/r-rails/plants For now removed both administrate and field-active_storage. Not sure if you can help me and and I can live with that problem for a while, not super urgent. It would be just nice to have dashboard.
same error here, preview not showing, but clicking the file name downloads the file, and works fine on the view itself. rails 7 + tailwind.
Console shows : Failed to load resource: the server responded with a status of 500 (Internal Server Error)
but clicking the text downloads the file fine from: http:// 127.0.0.1:3000 /rails/active_storage/disk/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDVG9JYTJWNVNTSWhiekpzTjJSd01XeDNkMnh4Y25aa00yZG1kemgxZVdWbE1qQm1NUVk2QmtWVU9oQmthWE53YjNOcGRHbHZia2tpUldGMGRHRmphRzFsYm5RN0lHWnBiR1Z1WVcxbFBTSXhNRE01TXpJNExuQnVaeUk3SUdacGJHVnVZVzFsS2oxVlZFWXRPQ2NuTVRBek9UTXlPQzV3Ym1jR093WlVPaEZqYjI1MFpXNTBYM1I1Y0dWSklnNXBiV0ZuWlM5d2JtY0dPd1pVT2hGelpYSjJhV05sWDI1aGJXVTZDbXh2WTJGcyIsImV4cCI6IjIwMjItMDktMTlUMTA6NTc6MjAuMzQwWiIsInB1ciI6ImJsb2Jfa2V5In19--8e1be9e0b90699529a08137c81bef4e5c3f82e5d/1039328.png
I was able to fix this issue by installing libvips. The field is trying to show a variant and since libvips doesn't exist, it can't generate that variant, hence that broken image.