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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:05:03+00:00 2026-06-01T01:05:03+00:00

I have uploaded a app in production mode to linode. I want make changes

  • 0

I have uploaded a app in production mode to linode.

I want make changes in local app in css, javascript, controllers, models, or any file that I need change or update code and after deploy in my remote app.

I use capistrano, and I have this recipe in deploy.rb file.

$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load pathe
require "rvm/capistrano"                  # Load RVM's capistrano plugin.
require "bundler/capistrano"
set :rvm_ruby_string, 'ruby-1.9.2-p318@global'  
set :rvm_type, :user
set :application, "app.com"
set :user, 'myuser'
set :repository,  "#{user}@ip.ip.ip.ip:~/app"
ssh_options[:forward_agent] = true

set :scm, :git
set :use_sudo, false
set :keep_releases, 1
set :deploy_to, "~/#{application}"
#set :deploy_via, :copy
set :deploy_via, :remote_cache

role :web, "ip.ip.ip.ip"                          # Your HTTP server, Apache/etc
role :app, "ip.ip.ip.ip"                          # This may be the same as your `Web` server
role :db,  "ip.ip.ip.ip", :primary => true # This is where Rails migrations will run
load 'deploy/assets'

The problem is that when I run cap deploy the process is very very slow take a 5 or 6 minutes in deploy If I want change 2 files or add a gem I want update only those files that have changed.

How can I speed up the deploy with capistrano. With git I go very fast but I have that enter more command, git add . git commit…

Note**

I have check with set :deploy_via, :remote_cache but I get errors with permissions in log of capistrano :O.

Log capistrano after cap deploy

[ip.ip.ip.ip] executing command
    [ip.ip.ip.ip] rvm_path=$HOME/.rvm/ $HOME/.rvm/bin/rvm-shell 'ruby-1.9.2-p318@global' -c 'if [ -d ~/app.com/shared/cached-copy ]; then cd ~/app.com/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard e142768dc6351878cb45712dca8d31ead4ffb40c && git clean -q -d -x -f; else git clone -q myuser@ip.ip.ip.ip:~/app ~/app.com/shared/cached-copy && cd ~/app.com/shared/cached-copy && git checkout -q -b deploy e142768dc6351878cb45712dca8d31ead4ffb40c; fi'
 ** [ip.ip.ip.ip :: err] Permission denied, please try again.
 ** [ip.ip.ip.ip :: err] Permission denied, please try again.
 ** [ip.ip.ip.ip :: err] Permission denied (publickey,password).
 ** [ip.ip.ip.ip :: err] fatal: The remote end hung up unexpectedly
    command finished in 1337ms
*** [deploy:update_code] rolling back
  * executing "rm -rf ~/app.com/releases/20120325150641; true"
    servers: ["ip.ip.ip.ip"]
    [ip.ip.ip.ip] executing command
    [ip.ip.ip.ip] rvm_path=$HOME/.rvm/ $HOME/.rvm/bin/rvm-shell 'ruby-1.9.2-p318@global' -c 'rm -rf ~/app.com/releases/20120325150641; true'
    command finished in 702ms
failed: "rvm_path=$HOME/.rvm/ $HOME/.rvm/bin/rvm-shell 'ruby-1.9.2-p318@global' -c 'if [ -d ~/app.com/shared/cached-copy ]; then cd ~/app.com/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard e142768dc6351878cb45712dca8d31ead4ffb40c && git clean -q -d -x -f; else git clone -q myuser@ip.ip.ip.ip:~/app ~/app.com/shared/cached-copy && cd ~/app.com/shared/cached-copy && git checkout -q -b deploy e142768dc6351878cb45712dca8d31ead4ffb40c; fi'" on 109.74.195.41

After create cached-copy directory

myuser@myuser:~/app.com/current$ if [ -d ~/app.com/shared/cached-copy ]; 
> then cd ~/app.com/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard e142768dc6351878cb45712dca8d31ead4ffb40c && git clean -q -d -x -f; else git clone -q myuser@ip.ip.ip.ip:~/app ~/app.com/shared/cached-copy && cd ~/app.com/shared/cached-copy && git checkout -q -b deploy e142768dc6351878cb45712dca8d31ead4ffb40c; fi
myuser@ip.ip.ip.ip's password: 
myuser@ip.ip.ip.ip:~/app.com/shared/cached-copy$

Thank you very much!

  • 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-01T01:05:05+00:00Added an answer on June 1, 2026 at 1:05 am

    The first thing I would suggest to speed it up is getting the deploy_via :remote_cache working. You need to make sure that the remote user can authenticate to your git repo, which means configuring your SSH key on the remote server to connect.

    Try setting this:

    ssh_options[:forward_agent] = true
    

    Github has a great help article on getting it working:

    http://help.github.com/deploy-with-capistrano/

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

Sidebar

Related Questions

I have uploaded my app on android market.I did some changes,and want to update
I want to know that if I have uploaded a free app on apple
I have uploaded an app to the app store, and now I want to
I have just uploaded my first app to iTunes Connect and noticed that my
my problem : the app I have uploaded into my cellular device is shown
I have uploaded my first app to android market a while ago - no
Have uploaded an iPhone app to iTunes Connect, providing a 512x512 icon with square
I'm using Xode 4, and i have recently uploaded my first app... but now
i have uploaded a php web application to google app engine , but all
I have an iPhone app I have developed that I want to have some

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.