Question: Here's the CSS block where I load CSS fonts:

```
@font-face {
    font-family: 'HelveticaNeueRegular';
    src: url('../fonts/helveticaneue/helveticaneue-roman.eot');
    src: url('../fonts/helveticaneue/helveticaneue-roman.eot?#iefix') format('embedded-opentype'),
         url('../fonts/helveticaneue/helveticaneue-roman.woff') format('woff'),
         url('../fonts/helveticaneue/helveticaneue-roman.ttf') format('truetype'),
         url('../fonts/helveticaneue/helveticaneue-roman.svg#helvetica_neueregular') format('svg');
    font-weight: normal;
    font-style: normal;
}

```

The fonts are located in `/app/assets/fonts` directory.

On the localhost, when I load the page, the fonts are not loaded, but on Heroku are all fonts loaded correctly.

What is wrong?

Answer: 
The reason you are seeing this, is that in a production environment all the assets are compiled and put into a single folder `/assets/asset-name`. With that said, both css and type faces are in the same folder, and can be accessed via the relative path. In a development environment, assets are not compiled and can be accessed at `/assets/asset-type/asset-name`, which means that the CSS and type faces won't be in the same folder. 

To overcome this obstacle, Rails has an amazing helper called [asset-url](http://guides.rubyonrails.org/asset_pipeline.html#coding-links-to-assets).

So for your example:

```
@font-face {
font-family: 'HelveticaNeueRegular';
src: asset-url('helveticaneue-roman.eot');
src: asset-url('helveticaneue-roman.eot?#iefix') format('embedded-opentype'),
     asset-url('helveticaneue/helveticaneue-roman.woff') format('woff'),
     asset-url('helveticaneue/helveticaneue-roman.ttf') format('truetype'),
     asset-url('helveticaneue/helveticaneue-roman.svg#helvetica_neueregular')     format('svg');
font-weight: normal;
font-style: normal;
}

```

Plus, since you added a fonts folder under assets, you will need to add this to your asset path: `config.assets.paths << "#{Rails.root}/app/assets/fonts"` in the `config/application.rb`
I finally figured out this issue - into `config/application.rb` add following:

```
config.assets.paths << Rails.root.join("app", "assets", "fonts")
config.assets.precompile += %w( .svg .eot .woff .ttf )

```