变量@fontAwesomeEotPath_iefix未定义 [英] variable @fontAwesomeEotPath_iefix is undefined

查看:84
本文介绍了变量@fontAwesomeEotPath_iefix未定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用引导程序处理我的第一个项目,每当尝试查看项目时都会收到此错误.我环顾四周,却找不到同样问题的人.任何帮助将是巨大的!预先感谢.

I'm working on my first project with bootstrap and I get this error whenever I try and view my project. I've looked around and haven't been able to find someone with same problem. Any help would be great! Thanks in advance.

Search#index中的Less :: ParseError

Showing /Users/Basil/Dropbox/College/CS 50/playedby.me/app/views/layouts/application.html.erb where line #4 raised:

variable @fontAwesomeEotPath_iefix is undefined
  (in /Users/Basil/Dropbox/College/CS 50/playedby.me/app/assets/stylesheets/bootstrap_and_overrides.css.less)
Extracted source (around line #4):

1: <!DOCTYPE html>
2: <html>
3: <head>
4:   <%= stylesheet_link_tag    'application.css', :media => "all" %>
5:   <%= javascript_include_tag "application" %>
6:   <%= csrf_meta_tags %>
7: </head>


这是我的bootrstrap_and_overrides.css.less

@import "twitter/bootstrap/bootstrap";
body { 
padding-top: 60px;
}

@import "twitter/bootstrap/responsive";

// Set the correct sprite paths
@iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png');
@iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white.png');

// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
// Note: If you use asset_path() here, your compiled boostrap_and_overrides.css will not 
//       have the proper paths. So for now we use the absolute path.
@fontAwesomeEotPath: '/assets/fontawesome-webfont.eot';
@fontAwesomeWoffPath: '/assets/fontawesome-webfont.woff';
@fontAwesomeTtfPath: '/assets/fontawesome-webfont.ttf';
@fontAwesomeSvgPath: '/assets/fontawesome-webfont.svg';

// Font Awesome
@import "fontawesome";

// Your custom LESS stylesheets goes here
//
// Since bootstrap was imported above you have access to its mixins which
// you may use and inherit here
//
// If you'd like to override bootstrap's own variables, you can do so here as well
// See http://twitter.github.com/bootstrap/less.html for their names and documentation
//
// Example:
// @linkColor: #ff0000;

@successBackground: white;
@successText: @green;
@errorBackground: white;
@errorText: @red;

@navbarHeight: 60px;

.alert-success, .alert-error {
    border: 10px solid @green;
    padding: 2%;
    font-size: 125%;
    line-height: 150%;
}

.alert-success { 
    border-color: @green;
}

.alert-error {
    border-color: @red;
}

推荐答案

请注意,您的bootstrap_and_overrides.css.less没有错误所抱怨的变量.

Notice that your bootstrap_and_overrides.css.less doesn't have the variable the error is complaining about.

在下面的行中添加其他@fontAwesome变量,您应该会很好.

Add the following line with the other @fontAwesome variables and you should be good.

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

或通过运行rails g bootstrap:install -f更新您的twitter引导安装.

Or update your twitter bootstrap install by running rails g bootstrap:install -f.

这篇关于变量@fontAwesomeEotPath_iefix未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆