1

I have an application thdirat uses Twitter Bootstrap for styling. It has worked fantastically for a year. Suddenly I get this error in development:

ActionView::Template::Error ('fontawesome.less' wasn't found
  (in /Users/me/myapp/code/myapp/app/assets/stylesheets/bootstrap_and_overrides.css.less)):

What could be causing this? I haven't changed the Gemfile or anything.

The line causing the error is the stylesheet inclusion tag in my template:

<%= stylesheet_link_tag "application", :media => "all" %>
RubyRedGrapefruit
  • 12,066
  • 16
  • 92
  • 193
  • rails g bootstrap:install -f source: http://stackoverflow.com/questions/13708303/variable-fontawesomeeotpath-iefix-is-undefined – John Mar 21 '14 at 16:08

3 Answers3

12

In app/assets/stylesheets/bootstrap_and_overrides.css.less I changed:

// Font Awesome
@import "fontawesome;

to:

// Font Awesome
@import "fontawesome/font-awesome";

and it worked.

RubyRedGrapefruit
  • 12,066
  • 16
  • 92
  • 193
0

when I run rails-select2-example, I met the same error. According to the font-awesome.less' wasn't found. #593, I changed:

@fontAwesomeEotPath: asset-path("fontawesome-webfont.eot?v=3.0.2");
@fontAwesomeEotPath_iefix: asset-path("fontawesome-webfont.eot?#iefix&v=3.0.2");
@fontAwesomeWoffPath: asset-path("fontawesome-webfont.woff?v=3.0.2");
@fontAwesomeTtfPath: asset-path("fontawesome-webfont.ttf?v=3.0.2");

// Font Awesome
@import "fontawesome";

into:

@fontAwesomeEotPath: asset-url("fontawesome-webfont.eot");
@fontAwesomeEotPath_iefix: asset-url("fontawesome-webfont.eot#iefix");
@fontAwesomeWoffPath: asset-url("fontawesome-webfont.woff");
@fontAwesomeTtfPath: asset-url("fontawesome-webfont.ttf");
@fontAwesomeSvgPath: asset-url("fontawesome-webfont.svg#fontawesomeregular");
// Font Awesome
@import "fontawesome/font-awesome";

It worked fine!

abelard2008
  • 1,984
  • 1
  • 20
  • 35
-1

In application.css

*= require font-awesome

Keon
  • 1,741
  • 3
  • 17
  • 27