As the title says. The OS is mac and I am studying ruby and rails, so I wrote it in .html.erb and .scss.
When I want to read an image file
erb:home.html.erb
<%= image_tag “Hogehoge Hogehoge.jpg” %>
If you write ↑, it will not be displayed in the browser! sprockets :: rails :: helper :: assetnotfound error
The solution
erb:home.html.erb
<%= image_tag “Hogehogehogehoge.jpg” %>
It was displayed by setting. In other words, I solved it by making all the names alphabetical.
When you want to use an image as the background
custom.scss
background-image: url(../images/hogehoge.jpg);
↑ is not displayed,
The solution
custom.scss
background-image: url(hogehoge.jpg);
It came to be displayed when.
I don't know the cause of either, but it's just a memo. ..
I started making it with my own hands for the first time, but it's more difficult than doing teaching materials. .. But it was fun. I will do my best at my own pace.
Recommended Posts