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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:01:35+00:00 2026-06-14T05:01:35+00:00

To precompile all css files in a project I could add this to production.rb:

  • 0

To precompile all css files in a project I could add this to production.rb:

config.assets.precompile << '*.css'

But how can I add only css files in a particular folder?

  • 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-14T05:01:36+00:00Added an answer on June 14, 2026 at 5:01 am

    Add all stylesheets into your app/assets/stylesheets/application.css:

    /*
     *= require_self
     *= require_tree dir_one
     *= require_tree dir_two
     */ 
    

    Then they will be precompiled. I think this is the preferred way over using config.assets.precompile.

    If you really want to use it, this SO question should help: How do I use config.assets.precompile for directories rather than single files?

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

Sidebar

Related Questions

I wish to precompile all the CSS and JS files in my project's app/assets
When I do: rake assets:precompile RAILS_ENV=production I get for example the following files in
After upgrading to rails 3.2 I'm getting this error on rake assets:precompile Invalid CSS
app/assets/stylesheets/application.css *= require formtastic I get this error: rake assets:precompile /Users/Nerian/.rvm/rubies/ruby-1.9.3-rc1/bin/ruby /Users/Nerian/.rvm/gems/ruby-1.9.3-rc1@davinci/bin/rake assets:precompile:all RAILS_ENV=production
In Rails 3.1 rake assets:precompile precompiles all separate .css and .js that are in
When I run bundle exec rake assets:precompile --trace , my precompilation fails but I
I know that Heroku is running the rake assets:precompile task: -----> Writing config/database.yml to
I'm getting this error when I push to Heroku: Running: rake assets:precompile rake aborted!
My setup is fairly simple default rails 3.2.1 setup. All my .css.sass files are
rake assets:precompile creates new file like application-be2b8c92856ffacee861d9e9c2935e3e, but there's old one named application-c730047bc2a5cf3a706aa3a9f998ab77.css. It

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.