ActionView::Template::Error (variable @fontAwesomeEotPath_iefix is undefined)

孤街浪徒 提交于 2020-01-22 19:55:07

问题


I get an error while trying to load any page:

ActionView::Template::Error (variable @fontAwesomeEotPath_iefix is undefined)
(in /app/assets/stylesheets/bootstrap_and_overrides.css.less)):
    2: <html>
    3: <head>
    4:   <title>Program</title>
    5:   <%= stylesheet_link_tag    "application", :media => "all" %>
    6:   <%= javascript_include_tag "application" %>
    7:   <%= csrf_meta_tags %>
    8: </head>   app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_html_erb__242882506_70513990'   app/controllers/problems_controller.rb:7:in `index'

What I did before? Just run bundle update


回答1:


Because of bootstrap update I will need to update bootstrap's assets:

rails g bootstrap:install -f

There are a new line in assets:

+@fontAwesomeEotPath_iefix: asset-path("fontawesome-webfont.eot#iefix");



回答2:


This also happened to me. This is because, When you update your Bootrap gem, You should update Its js and less css. Do

rails g bootstrap:install -f

This will add a line to your app/assets/css/bootstrap_overrides.css.less file like

@fontAwesomeEotPath_iefix: asset-path("fontawesome-webfont.eot#iefix");


来源:https://stackoverflow.com/questions/13701132/actionviewtemplateerror-variable-fontawesomeeotpath-iefix-is-undefined

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!