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

Images not showing in production. #107

Closed
czepesch opened this issue Jul 11, 2022 · 6 comments
Closed

Images not showing in production. #107

czepesch opened this issue Jul 11, 2022 · 6 comments

Comments

@czepesch
Copy link

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:
thoughtbot/administrate#2116

Now app is deploying like it should, but images in /admin section are not displayed
image

This exactly image is displayed on frontend though:
image

be so kind to give me a hint, maybe I forgot something or misunderstood.
Thanks.

@Dreamersoul
Copy link
Owner

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?

@czepesch
Copy link
Author

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.

@Dreamersoul
Copy link
Owner

@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 🙏🏻

@czepesch
Copy link
Author

@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.

@SanzPlusNB
Copy link

SanzPlusNB commented Sep 19, 2022

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

@cyu
Copy link

cyu commented Jan 12, 2023

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.

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