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 9034995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T08:38:33+00:00 2026-06-16T08:38:33+00:00

I have some static error pages under /public , in which I have linked

  • 0

I have some static error pages under /public, in which I have linked a stylesheet called errors.min.css in the following manner:

<link rel="stylesheet" href="errors.min.css">

However, while I’m on a path except the root (/abc/non-existent-url), the pages don’t render properly as the CSS file is not found (since its under a different path now.) I tried setting the URL to:

/public/errors.min.css

but it doesn’t seem to work. Is there something I can do (except making the CSS inline, which I don’t want to do)?

  • 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-06-16T08:38:34+00:00Added an answer on June 16, 2026 at 8:38 am

    You should not use static stylsheet linking in Rails. Try the following:

    <%= stylesheet_link_tag "errors.min.css" %>
    

    This assumes that the stylesheet is in the app/assets/stylesheets/ directory.

    Also your static pages would have to end with .html.erb for this to work.


    P.S. Static pages should also be made using a controller. See this tutorial on static pages.

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

Sidebar

Related Questions

I have some async method public static Task<JObject> GetUser(NameValueCollection parameters) { return CallMethodApi(users.get, parameters,
I have some code which I'm currently using to change the static-IP of a
I have some static pages in a navigation menu. I want to add more
I have routes defined to some static pages and also to some controllers (users
I have a 'pages' controller with some static pages instead of using the rest
I have a simple website(primarily static html/css) but for some reason some of the
I have the following Controllers (in diagram) which Call the Static method to get
I have the following controller @Controller @RequestMapping(/project/view.html) public class ProjectViewController { private static final
I have a server (nginx) which is routing some urls to static directories, and
I have some static resources (images and HTML files) that will be localized. One

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.