css - Font awesome not loading icons - Rails 4 -
i using twitter bootstrap in app , using ruby gem twitter-bootstrap-rails (2.2.8)
. have upgraded rails version rails 4.
i using following gems assets
gem 'less-rails' gem 'coffee-rails' gem 'twitter-bootstrap-rails' gem 'execjs' gem 'therubyracer', :platforms => :ruby
now problem icon of font awesome not loading. should load magnifier glass per html <button type="submit" class="btn"><i class="icon-search"></i></button>
here bootstrap_and_overrides.css.less
@import "twitter/bootstrap/bootstrap"; @import "twitter/bootstrap/responsive"; // set correct sprite paths @iconspritepath: asset-path("twitter/bootstrap/glyphicons-halflings"); @iconwhitespritepath: asset-path("twitter/bootstrap/glyphicons-halflings-white"); // set font awesome (font awesome default. can disable commenting below lines) // note: if use asset_path() here, compiled bootstrap_and_overrides.css not // have proper paths. use 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";
still not sure problem was, have included gem "font-awesome-rails"
in gemfile
, *= require font-awesome
in application.css
, after worked fine.
Comments
Post a Comment