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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T09:19:57+00:00 2026-05-18T09:19:57+00:00

Is it possible without having to access the website to tell rails to perform

  • 0

Is it possible without having to access the website to tell rails to perform a cache of all the files within the application.html.erb page together?

I have the following code in my page:

<%= stylesheet_link_tag ‘reset’,’forms’,’layout’,’common’,’pages’, :cache => ‘_cached’ %>

This will combine everything together into a _cached.css file when the website is loaded for the first time in production mode. However, I would like for the file to be regenerated once the website is initialized.

So the steps would be

  • start the rails app
  • remove the existing _cached.css file
  • tell rails to recreate the file based on the code within the application.html.erb file
  • website is live…

Any ideas on how todo this? Can be down as a rake command or something?

  • 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-18T09:19:57+00:00Added an answer on May 18, 2026 at 9:19 am

    After setting up a rake task that accesses the website files once the website is loaded, this works.

    namespace :assets do
    
      desc "Removing existing cached files"
      task :clear => :environment do
        FileUtils.rm(Dir['public/javascripts/_cached.js']) 
        FileUtils.rm(Dir['public/javascripts/_ie6.js']) 
        FileUtils.rm(Dir['public/stylesheets/_cached.css'])
      end
    
      desc "Recreate the javascripts/stylesheets cache."
      task :generate => [:environment, :clear] do
        puts "Recreate the javascripts/stylesheets cache"
        ActionController::Base.perform_caching = true
        app = ActionController::Integration::Session.new(ActionController::Dispatcher.new)
        app.get '/'
      end
    
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In SQL Server is it possible to perform table partition without having to recode
Is it possible to access an svn log without having svn installed? I'm trying
Is it possible in MSBuild to batch tasks without having the metadata value you
Is it possible to find which method was called on an object without having
Is it possible to get the 'nth' return value from a function without having
In Scala, is it possible to call a member method without having to call
Is it possible to create a table having column but column without datatype? Meaning
Question: Is it possible to use a variable as your table name without having
I want to know if it is possible to use MySQL Engine without having
I have a C# application that will need to access files that are on

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.