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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:49:39+00:00 2026-06-14T01:49:39+00:00

I’m trying to deploy my Rails application using Capistrano. My deploy.rb file looks like

  • 0

I’m trying to deploy my Rails application using Capistrano.

My deploy.rb file looks like this :

require "bundler/capistrano"

server "xx.xx.xxx.xxx", :web, :db, :primary => true

set :application,       "myApp"
set :user,              "ubuntu"
set :deploy_to,         "/home/#{user}/apps/#{application}"
#set :deploy_via,       :remote_cache
set :migrate_target,    :current
set :keep_releases,     3

set :scm,               "git"
set :repository,        "git@github.com:name/#{application}.git"
set :branch,            "master"
set :use_sudo,          false

default_run_options[:pty] = true

# default_run_options[:shell] = '/bin/bash'

ssh_options[:forward_agent] = true
ssh_options[:keys] = ["#{ENV['HOME']}/.ec2/keypair.pem"]

Now whenever I try to do

cap deploy:cold

I get an error just like the following :

https://gist.github.com/c54933142b900f9f93b9

Any help would be appreciated .

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

    The only thing I am looking at that I don’t recognize is the set :migrate_target :current — this is probably the default or implied so maybe nothing to worry about, but the root error from your gist is

     ** [out :: xx.xx.xxx.xxx] rm:
     ** [out :: xx.xx.xxx.xxx] cannot remove `/home/ubuntu/apps/myApp/current'
     ** [out :: xx.xx.xxx.xxx] : Is a directory
    

    current should be a symbolic link, not a directory, so it’s hard to know how it got to be directory.

    I would log in to the server, change to /home/ubuntu/apps/myApp/ then rm -rf current. From there you could manually create the expected symlink (current will link to a directory whose name is a date/time), or alternatively back from your local machine run cap deploy:create_symlink then try a regular deploy.

    I think it’s fair to say that capistrano initialization is not it’s strong suit — once you get things going it tend to be ridiculously awesome, until then, more just infuriatingly obtuse.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to render a haml file in a javascript response like so:
For some reason, after submitting a string like this Jack’s Spindle from a text
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example

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.