6

tôi nhận được một lỗi khi cố gắng tải bất kỳ trang:ActionView :: Template :: Lỗi (biến @fontAwesomeEotPath_iefix là undefined)

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' 

Những gì tôi đã làm trước đây? Chỉ cần chạy bundle update

Trả lời

14

Do cập nhật bootstrap tôi sẽ cần phải cập nhật nội dung bootstrap của:

rails g bootstrap:install -f 

Có một dòng mới vào tài sản:

[email protected]_iefix: asset-path("fontawesome-webfont.eot#iefix"); 
+1

Bạn lưu ngày của tôi. Chỉ cần một add-on ... Sử dụng -f sẽ ép buộc các phần ghi đè như vậy có thể được đề cập đến để sao lưu bất cứ thứ gì bạn đã thêm vào tập tin được tạo bởi bootstrap trước đó: install (trong trường hợp của tôi nó đã xóa một số thay đổi mà tôi đã thực hiện cho 'app/assets/stylesheets/bootstrap_and_overrides.css.less'). – microspino

0

này cũng xảy ra với tôi. Điều này là bởi vì, Khi bạn cập nhật đá quý Bootrap của bạn, bạn nên cập nhật js của nó và ít css. Đừng

rails g bootstrap:install -f 

này sẽ thêm một dòng vào ứng dụng/tài sản/css của bạn/bootstrap_overrides.css.less tập tin như

@fontAwesomeEotPath_iefix: asset-path("fontawesome-webfont.eot#iefix"); 
Các vấn đề liên quan