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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:52:37+00:00 2026-06-15T09:52:37+00:00

I recently added the turbo sprockets gem https://github.com/ndbroadbent/turbo-sprockets-rails3 to my rails application, I’m using

  • 0

I recently added the turbo sprockets gem https://github.com/ndbroadbent/turbo-sprockets-rails3
to my rails application, I’m using capistrano to deploy to Amazon EC2.

I’m a little confused on how I can make this work.
assets:precompile worked on my local machine, but on the amazon instance it didn’t.

Long story short capistrano makes a new release directory for each deployment and the public/assets
directory is empty, so every time it creates a new one and when running assets:precompile it precompiles all of the assets.

Should I precompile localy and add them to git or copy the public/assets directory from the last deployment before capistrano runs assets:precompile?

What would be the cleanest/best practice solution?

Or should I keep the compiled assets in a shared directory?

  • 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-15T09:52:37+00:00Added an answer on June 15, 2026 at 9:52 am

    The simplest solution I could think of is using the shared/assets directory to store
    my assets and make a symbolic link to the the release public/assets directory before the assets are being compiled .

     task :assets_precompile do
       run "ln -s #{shared_path}/assets #{release_path}/public/assets"
       run "cd #{release_path} && RAILS_ENV=production bundle exec rake assets:precompile"
     end
    

    Edit: Anjan pointed out that if you use deploy:assets ( If you have load 'deploy/assets' in your Capfile ) this is done by default so that’s a cleaner solution .

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

Sidebar

Related Questions

I've recently added html validation to my cucumber features. I'm using the gem be_valid_asset
I recently added devise confirmable module to my rails app. My application runs well
I recently added a :title column using Rails migration: class AddTitleToMicroposts < ActiveRecord::Migration def
I recently added an extra authentication backend to allow users to login using either
I recently added a feature to a large application written in Delphi (version 2009)
I recently added some url re-writing to my web application and had to added
We recently added auditing to our database. A colleague implemented it using triggers and
Facebook recently added photo-tagging capabilities to its Graph API: http://developers.facebook.com/blog/post/509/ I am using FbConnect
I recently added Fragments to my applications. For a new application i'll need to
Creating a ruby on rails site and recently added: <% if (?can :manage, :table)

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.