Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7195833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:39:32+00:00 2026-05-28T20:39:32+00:00

In my global.css file which is loaded by application.html.erb , I have the following

  • 0

In my global.css file which is loaded by application.html.erb, I have the following lines:

@font-face {
  font-family: myfont;
  src: url(/lib/fonts/MyFont-AH.ttf) format("truetype"); /* For IE */
  src: local("MyFont-AH"), url(/lib/fonts/MyFont-AH.ttf) format("truetype"); /* Non-IE */ 

}

And then elsewhere I have

h1 {
  font-family: myfont, helvetica, arial;
}

When I booted up the server h1 was using the Helvetica font, and I got the error in my log ActionController::RoutingError (No route matches [GET] "/lib/fonts/MyFont-AH.ttf"):. I figured that this meant I would need to edit my routes file, so I went and added the line get "/lib/fonts/MyFont-AH.ttf", but then when I reloaded the page I got the error missing :controller because there is no controller tied to this action. When I created a controller and matched the get request to it, it then wanted a template. It seems that it wants me to have a controller / action set up like most other get requests, so I’m not quite sure what to do here. Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T20:39:33+00:00Added an answer on May 28, 2026 at 8:39 pm

    I upgraded to Rails 3.2 and am using the Asset Pipeline (from Rails 3.1+), and I placed the fonts I wanted to display in vendor/assets/fonts. Then I added the following line to my application.rb file: config.assets.paths << "#{Rails.root}/vendor/assets/fonts". Finally in my CSS file I used the format:

    @font-face {
      font-family: myfont;
      src: url("/assets/myfont.ttf") format("truetype"); /* For IE */
      src: local("myfont"), url("/assets/myfont.ttf") format("truetype"); /* For non-IE */
    }
    

    I think a part of the original problem might have been that my files were stored with the extension .TTF rather than .ttf but I’m not sure. All I know is it’s working now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an index.html and global.css files. When I open these files at Coda,
In my app I have the follow line <%= stylesheet_link_tag global.css, pop_div.css, log_in.css.erb %>
Per a great answer from another question I have begun mounting global resources (css/js/images)
All, I have the following Zend application structure: helloworld - application - configs -
I've got over some tutorials on how to gzip a css file in which
I am using wicket 1.5.x and trying to load a css file which will
I have a site using 2 css : one global, one page specific. By
Currently I have a dynamic CSS file, completed by PHP from results in the
I have jquery script, which should send response to my file. If everything good,
So, I have the following in my global.asax creating my MVC routes. They are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.