Search code examples
ruby-on-rails-4asset-pipelinestylesheetpassengerproduction

ActionController::RoutingError (No route matches [GET] "/font/fontello.woff")


Good afternoon, I'm preparing a server under linux + apache + passenger + rvm + rails 4 in production, the problem I present is for the icons look, the first problem already surpassed that was to take the styles css is I resolved by enabling:

# Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = true

# Generate digests for assets URLs. config.assets.digest = true

in the / config / enviroments / production.rb

yet it still has the problem of icons, reference these are in the following path:

/ project / app / assets / stylesheets / fontello /

thanks in advance


Solution

  • If I understand your problem properly its the same issue I was facing while back. I fixed my problem by changing /app/assets/stylesheets/icons.css file:

    @font-face {
      font-family: 'icons';
      src: url('../font/icons.eot?26481838');
      src: url('../font/icons.eot?26481838#iefix') format('embedded-opentype'),
           url('../font/icons.woff?26481838') format('woff'),
           url('../font/icons.ttf?26481838') format('truetype'),
           url('../font/icons.svg?26481838#icons') format('svg');
      font-weight: normal;
      font-style: normal;
    }
    

    I removed the "../" from beggining of each line so the it would look like this:

    @font-face {
      font-family: 'icons';
      src: url('font/icons.eot?26481838');
      src: url('font/icons.eot?26481838#iefix') format('embedded-opentype'),
           url('font/icons.woff?26481838') format('woff'),
           url('font/icons.ttf?26481838') format('truetype'),
           url('font/icons.svg?26481838#icons') format('svg');
      font-weight: normal;
      font-style: normal;
    }
    

    Hope this helps!