ruby-on-railstwitter-bootstraptwitter-bootstrap-railsfont-awesome

Rails: Font Awesome doesnt download


I just run bundle update in my project, and Font-Awesome doesn't work anymore.

I tried both font-awesome-sass-rails and twitter-bootstrap-rails (which includes font awesome too), and I had the same behavior in both of them: instead of the icons, a square is shown.

I check the compiled CSS, and tried to download the fonts:

@font-face {
  font-family: "FontAwesome";
  src: url(/assets/fontawesome-webfont.eot);
  src: url(/assets/fontawesome-webfont.eot?#iefix) format("embedded-opentype"), url(/assets/fontawesome-webfont.woff) format("woff"), url(/assets/fontawesome-webfont.ttf) format("truetype");
  font-weight: normal;
  font-style: normal;
}

So I tried to download myapp/assets/fontawesome-webfont.woff, and it worked. I just can't understand what's the problem here.

My application.css.scss:

*
 *= require_self
 *= require bootstrap-datepicker
 *= require_tree .
 */

@import "bootstrap";
body {
  padding-top: 60px;
}
@import "bootstrap-responsive";
@import "font-awesome";

@font-face {
  font-family: 'Pontano Sans';
  font-style: normal;
  font-weight: 400;
  src: local('Pontano Sans'), local('PontanoSans-Regular'), url(/assets/pontanosans.woff) format('woff');
}

*{
  font-family: 'Pontano Sans', sans-serif !important;
}

.table tbody tr:hover {
  cursor: pointer;
}

// rest of file...

The pontano-sans, for example, work just as expected.

My Gemfile (just the assets group):

group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  gem 'bootstrap-sass'
  gem 'font-awesome-sass-rails'
  gem 'libv8', :platforms => :ruby
  gem 'therubyracer', '>= 0.11.1', :require => 'v8', :platforms => :ruby
  gem 'uglifier', '>= 1.0.3'
  gem 'turbolinks'
  gem 'mousetrap-rails'
  gem 'jquery-turbolinks'
  gem 'spinjs-rails'
  gem 'ajaxspin'
  gem 'chosen-rails'
  gem 'jquery-rails'
  gem 'turbo-sprockets-rails3'
  gem 'bootstrap-datepicker-rails'
end

What am I doing wrong here?

Thanks in advance.


EDIT!

Looks like a bug: https://github.com/littlebtc/font-awesome-sass-rails/issues/22


Solution

  • Well, this is a bug.

    For now I'm using my own fork of the repository.