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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:04:00+00:00 2026-05-27T22:04:00+00:00

I am deploying a php project from git through the use of capistrano. I

  • 0

I am deploying a php project from git through the use of capistrano. I am currently minifying my javascript (using jammit) and css (using yui) through some capistrano tasks already. The issue I see is that I am doing this minification on the destination servers rather than once locally pre-deployment of the code base. The cause of concern is that I switched the javascript minification from yui to jammit and do not want to have to install this new ruby gem on multiple production servers when my deployment servers already have it installed. I inherited the capistrano file from anohter developer so I’m not 100% clear on the process of when the code gets checked out, and when it gets sent to the remote server, and what task I should hook into.

My initial thought is to do it before "deploy" but again, am not sure I’ll have the source code available to act on.

  • 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-27T22:04:01+00:00Added an answer on May 27, 2026 at 10:04 pm

    The short answer is "you don’t". The deploy hook calls deploy:update_code

    deploy:update_code, {:except=>{:no_release=>true}}

    Copies your project to the remote servers. This is the first stage of any deployment; moving your updated code and assets to the deployment servers. You will rarely call this task directly, however; instead, you should call the deploy’ task (to do a complete deploy) or the update’ task (if you want to perform the `restart’ task separately).

    You will need to make sure you set the :scm variable to the source control software you are using (it defaults to :subversion), and the :deploy_via variable to the strategy you want to use to deploy (it defaults to :checkout).

    Which does the following in one fell swoop:

    1. Checkout code
    2. Zip up code
    3. move code to remote server
    4. clean up local code

    (with some variation depending on your deployment settings).

    However,
    I was able to to get around this by utilizing the download and upload commands.

    tmp_path = "/tmp/#{release_name}/public"
    download "#{current_path}/public/javascripts", "#{tmp_path}/javascripts/":via => :scp, :recurisve => true
    system "jammit -o #{tmp_path}/javascripts -c #{tmp_path}/javascripts/assets.yml"
    upload  "#{tmp_path}/javascripts/common.js", "#{current_path}/public/javascripts", :via => :scp
    system "rm -rf #{tmp_path}"
    

    I don’t like it as it’s not quite as clean, but it gets the job done the way I need to get it done.

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

Sidebar

Related Questions

I'm deploying to Ubuntu slice on slicehost, using Rails 2.1.0 (from gem ) If
I'm deploying a PHP application that connects to an Oracle 9i server using the
I'm trying to get Capistrano deploying my web app. I'm deploying a php app
I'm using phpFog and have been deploying via git push -f <repo> to overwrite
I need to find a method of deploying a PHP project stored in a
I come from a PHP/Rails background where deploying a website often means FTP/Checkout of
I am developing a PHP based application and using Capistrano to deploy it to
I'm deploying a new php project on a Windows based host and the big
I have a PHP project (Symfony2) that uses RabbitMQ. I use its as simple
I'm using a php framework with a mongodb adapter that doesn't currently comprehend embedded

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.