Problem with assets jsoneditor-icons.png
must-not-code opened this issue · 5 comments
Hi, thanks for bug report.
I made a copy of icons.png file in v0.0.5. I think this should help
Thanks this helped.
I got the same bug. I found in your assets the file jsoneditor-icons.png and put it in my Assets but
it still fails to appear.
When I load the page the icons do not appear and the empty icon image points to http://exampleapp.com/assets/active_admin/img/jsoneditor-icons.png when I check it on chrome developer tool
But where should I place in my Rails 4 app the file jsoneditor-icons.png ?
I tried putting it in /app/assets/images/active_admin/img/jsoneditor-icons.png. did not work
Tried also /app/assets/active_admin/img/jsoneditor-icons.png, did not work either.
Should I manually compile it in Initializer/asset.rb ?
Thanks for your help
For the sake of other people running into the same issue: I figured it out: actually the image jsoneditor-icons.png was being loaded via the gem to to my assets but its location was: https://myapp.com/assets/img/jsoneditor-icons.png
But on active admin, the icons were still empty because, after checking via chrom debug tools, they were pointing to https://myapp.com/assets/active_admin/img/jsoneditor-icons.png instead of https://myapp.com/assets/img/jsoneditor-icons.png
I tried to understand why to no avail.
Hte only solution I found is to override the Gem css and creating the css to the the image hosted on my cdn.
For example
.jsoneditor .field.empty {
background-image: url("http:/mycdn.images/jsoneditor-icons.png") !important;
background-position: 0 -144px;
}
Working now even if it's not very clean.
yeah It was failing for me as well, what I did was to download the image and place it in the following folder:
app/assets/images/active_admin/img/jsoneditor-icons.png
or could be placed also in:
vendor/assets/images/active_admin/img/jsoneditor-icons.png