Develop applications with rails. I deployed it to the production environment (heroku), but it looks different ... I've solved it, but I'll keep a record of new discoveries!
I deployed but the view is broken ↓ I haven't compiled the asset file! ↓
precompile RAILS_ENV=Run production
↓
Deploy again. "This should be okay!"
↓
It wasn't fixed ...
# Cause
In conclusion, it wasn't a compilation issue, but the external page was an HTTP page. (The console says ``` This request has been blocked; the content must be served over HTTPS.```, but I haven't confirmed it.)
It was a new discovery without knowing that it would cause an error when trying to load the http one while it was loaded by https!
# solution
It was said that there is no problem if it is https, so I changed the path read by http to https, but it did not correspond ...
This time I was thinking of reading the reset CSS from the outside and using it, so I solved it by creating a file as reset.css instead of reading it from the outside.
## Reference article
https://qiita.com/Kouch/items/5089fb36694c6e467a3a
https://www.transnet.ne.jp/2016/02/28/rails%e5%88%9d%e5%ad%a6%e8%80%85%e3%81%8c%e3%81%a4%e3%81%be%e3%81%9a%e3%81%8dcolnr%e3%80%8c%e3%82%a2%e3%82%bb%e3%83%83%e3%83%88%e3%83%91%e3%82%a4%e3%83%97%e3%83%a9%e3%82%a4%e3%83%b3/
Recommended Posts