加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

twitter-bootstrap – 变量@fontAwesomeEotPath_iefix是未定义的

发布时间:2020-12-18 00:08:37 所属栏目:安全 来源:网络整理
导读:我正在使用bootstrap工作我的第一个项目,我得到这个错误,当我尝试和查看我的项目。我已经环顾四周,却找不到有同样问题的人。任何帮助将是伟大的!提前致谢。 Less :: ParseError in Search#index Showing /Users/Basil/Dropbox/College/CS 50/playedby.me
我正在使用bootstrap工作我的第一个项目,我得到这个错误,当我尝试和查看我的项目。我已经环顾四周,却找不到有同样问题的人。任何帮助将是伟大的!提前致谢。

Less :: ParseError in Search#index

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没有错误所抱怨的变量。

添加以下行与其他@fontAwesome变量,你应该是好的。

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

或者通过运行rails g bootstrap:install -f更新你的twitter bootstrap安装。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读