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

  • Home
  • SEARCH
  • 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 8029495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:27:16+00:00 2026-06-05T00:27:16+00:00

I am learning Rails and I encounter a prolem that i cannot find an

  • 0

I am learning Rails and I encounter a prolem that i cannot find an answer for. I have 2 css files “print.css” and “screen.css” , both in “/public/stylesheets”

When I load them in “application.html.erb” in the layout and start the server, both files are missing from on the local website. This is the error:

GET http://localhost:3000/assets/print.css 404 (Not Found)

GET http://localhost:3000/assets/screen.css 404 (Not Found)

Here is the code from “application.html.erb”:

<!DOCTYPE html>
<html>
<head>
    <title><%= title %></title>
    <%= csrf_meta_tag %>
    <%= stylesheet_link_tag "screen", "print" %>

</head>
<body>
    <%= yield %>
</body>
</html>

Furthermore i have added this

config.assets.compile = true

to my “./config/environments/development.rb” and ran

bundle exec rake assets:precompile RAILS_ENV=development

to no avail.

Please advise!

  • 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-05T00:27:18+00:00Added an answer on June 5, 2026 at 12:27 am

    Please read up on the asset pipeline. It is no longer common practice to put stylesheets (or javascript/images) in the public/ directory. Rather, they should be placed in app/assets/stylesheets/ where they can be precompiled and included with

    <%= stylesheet_include_tag 'application' %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Recently I have started learning rails and was a little surprised that the default
I'm just learning rails and have noticed that when I create an object that
I am learning Rails and I have noticed that Rails continously uses helper method
I am learning Rails, at the moment, but the answer doesn't have to be
Learning rails and something smells a little funny. I have the following form for
I am learning Rails and have very little idea about Sinatra & Merb. I
Just started learning Rails (3). I am tearing my hair out trying to find
Just learning rails, developing first app and having trouble finding a straight answer to
I am learning rails, and I came across Migrations. It seems that everytime I
I have a boss who is convinced learning Rails is too steep a learning

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.