ActionView :: Template :: Error(变量@fontAwesomeEotPath_iefix未定义)

时间:2012-12-04 10:45:27

标签: css ruby-on-rails twitter-bootstrap less twitter-bootstrap-rails

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

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

2 个答案:

答案 0 :(得分:14)

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

rails g bootstrap:install -f

资产中有一条新行:

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

答案 1 :(得分: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");