我在我的应用程序中使用twitter bootstrap,因为我使用ruby gem twitter-bootstrap-rails (2.2.8)
.我已将导轨版本升级为导轨4.
我正在使用以下宝石作为资产
gem 'less-rails' gem 'coffee-rails' gem 'twitter-bootstrap-rails' gem 'execjs' gem 'therubyracer', :platforms => :ruby
现在问题是没有加载字体awesome的图标.它应该根据我的HTML加载放大镜玻璃
这是我的bootstrap_and_overrides.css.less
@import "twitter/bootstrap/bootstrap"; @import "twitter/bootstrap/responsive"; // Set the correct sprite paths @iconSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings"); @iconWhiteSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings-white"); // Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines) // Note: If you use asset_path() here, your compiled bootstrap_and_overrides.css will not // have the proper paths. So for now we use the absolute path. @fontAwesomeEotPath: asset-path("fontawesome-webfont.eot"); @fontAwesomeEotPath_iefix: asset-path("fontawesome-webfont.eot#iefix"); @fontAwesomeWoffPath: asset-path("fontawesome-webfont.woff"); @fontAwesomeTtfPath: asset-path("fontawesome-webfont.ttf"); @fontAwesomeSvgPath: asset-path("fontawesome-webfont.svg"); // Font Awesome @import "fontawesome/font-awesome"; // Glyphicons //@import "twitter/bootstrap/sprites.less";
Ishank Gupta.. 9
仍然不确定问题是什么,但我已经包括gem "font-awesome-rails"
在我Gemfile
和*= require font-awesome
我的application.css
,之后一切正常.
仍然不确定问题是什么,但我已经包括gem "font-awesome-rails"
在我Gemfile
和*= require font-awesome
我的application.css
,之后一切正常.