Getting Katex fonts to load with Rails Asset Pipeline

前端 未结 3 1974
长情又很酷
长情又很酷 2021-01-28 11:21

I\'m integrating the Katex math formula rendering library into a Rails 3.2 app but the font assets keep returning a 404 error message:



        
3条回答
  •  轮回少年
    2021-01-28 12:00

    Thanks guys. /fonts/fonts works for me but still have another problem when I refresh page, the fonts suddenly disappear and appear again.

    I found a solution, why not put fonts/*.ttf into app/assets/images/fonts/*.ttf for dev env?

    At the same time keep config/environments/development.rb still the default config.serve_static_assets = false false value.

    This works for me.

提交回复
热议问题