FontAwesome gibbering suddenly in Rails 3.2 app

We have a rails 3 application, it works fine, we deployed it. I had to create a new computer for development, clone my repo, configure everything, and now the awesome fonts fonts refuse to work (show gibberish). I cloned into my original computer; in my source folder they work fine. But no new clones do this.

Instead of showing the font, they display the content (a set of time sheets in the scss file, for example, '\ f010'). Usually it appears as a strange shape or something like that, but definitely not an icon. Tried Mac OS X Mountain Lion and Ubuntu 12.04, Chrome and Firefox.

What we tried:

  • Created a new branch in the source folder. All gems have been updated to the latest version - I thought the clone could have newer gems that made it break. The original project still looks great, new clones (and checking out the branch).
  • Replaced the .scss and font files from the new download from the fontawesome site.
  • The verified path is correct for font files (they seem to be found because the Chrome inspector does not complain about missing font files - if I change the path, he complains. They just aren't being used / used properly)

The Gem list in both folders shows the same gems with the same versions.

FontAwesome path:

MYAPP / Provider / Assets / Style Sheets / FontAwesome

with sass and fonts folders inside this.

The only thing that has changed in sass is the path line:

$ fontAwesomePath: "FontAwesome / font / fontawesome-webfont"! default;

Which, as I said, seems to work; if I change the path, chrome complains about missing fonts.

I am using Apache 2, Ruby ree-1.8.7 p-358, Rails 3.2.7, Passenger 3.0.12, RVM 1.14.10, Bundler 1.1.4. Passenger and companion are sitting in my global gemset. Here is my gemfile:

# myapp/Gemfile # The specified versions are to make sure everything is as it is in the # original folder; didn't make a difference. But the original branch has #them and is working. source 'https://rubygems.org' gem 'rails', '3.2.7' gem 'chronic', '0.6.7' gem 'enumerated_attribute', '0.2.16' gem 'exception_notification', '2.6.1' gem 'google-api-client', '0.4.5' gem 'her', '~> 0.2.6' gem 'jquery-rails', '2.0.2' gem 'mysql2', '0.3.11' gem 'paperclip', '~> 2.7.0' gem 'pdfkit', '0.5.2' gem 'remotipart', '~> 1.0' gem 'settingslogic' gem 'slim-rails'#, '1.0.3' gem 'validates_timeliness', '~> 3.0.2' gem 'whenever', '0.7.3', :require => false group :assets do gem 'compass-rails'#, '1.0.3' gem 'sass-rails'#, '3.2.5' end gem 'coffee-rails'#, '3.2.2' gem 'uglifier'#, '1.2.7' group :development do gem 'quiet_assets', '1.0.1' gem 'thin' , '1.4.1' end gem 'letter_opener', '0.0.2', :group => [:development, :test, :staging] gem 'rspec-rails', '2.11.0', :group => [:development, :test] group :test do gem 'capybara', '1.1.2' gem 'factory_girl_rails', '1.7.0' gem 'guard-rspec', '1.2.1' gem 'shoulda', '3.1.1' end 

If anyone needs more information, just let me know. I have run out of ideas, and I'm not going anywhere, and I'm worried to deploy them now, and our prod env has gone bad!

EDIT: Still failing. I upgraded to Rails 3.2.8, and all gems are in their latest versions, with the exception of paperclip and factory_girl_rails, which use earlier versions for Ruby 1.8.7.

Destroyed all my folders, cloned new ones, work fine. Cloned the second, nothing good. Open the first clone in Chrome incognito window does not work. Inspector → Resources → Frames → (site) → Fonts show font files.

Here is an image of how it should look (left) against the problem (right): Problem Fonts

+4
source share
1 answer

try this, I recently had a similar problem,

if you put this at the top of your CSS files,

 /* *= require font-awesome */ 

and then use this gem 'font-awesome-rails' , it should work

0
source

All Articles