6

尝试加载任何页面时出现错误:

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'

我之前做了什么?赶紧跑bundle update

4

2 回答 2

14

由于引导更新,我需要更新引导的资产:

rails g bootstrap:install -f

资产中有一条新线:

+@fontAwesomeEotPath_iefix: asset-path("fontawesome-webfont.eot#iefix");
于 2012-12-04T10:45:26.813 回答
0

这也发生在我身上。这是因为,当您更新 Bootrap gem 时,您应该更新它的 js 和更少的 css。做

rails g bootstrap:install -f

这将在您的 app/assets/css/bootstrap_overrides.css.less 文件中添加一行,例如

@fontAwesomeEotPath_iefix: asset-path("fontawesome-webfont.eot#iefix");
于 2012-12-13T05:10:09.960 回答