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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:19:34+00:00 2026-06-11T05:19:34+00:00

I’ve recently had to make some updates to an app that I haven’t touched

  • 0

I’ve recently had to make some updates to an app that I haven’t touched in about a year. When attempting to deploy with Capistrano (via Github), I get this error:

[deploy:update_code] exception while rolling back: IOError, closed stream

Full logged error here: https://gist.github.com/2829751

I reinstalled my server’s SSH key after the Github SSH security scare. Nothing should have changed on the remote server, and deploying worked fine previously. The only significant change on my local system is moving to RVM.

Any ideas what’s causing the error?

Here’s my deploy.rb file, if that helps:

default_run_options[:pty] = true 

set :domain, 'xxx.xxx.xxx'
set :repository,  "XXX MY REPO XXX"
set :branch, 'master'
set :password, 'XXXXXXX'

set :deploy_to, "/var/www/#{domain}"

set :scm, :git
set :repository_cache, "git_cache"
set :deploy_via, :remote_cache

ssh_options[:paranoid] = false

set :user, "XXX"
set :runner, user
set :use_sudo, true
set :rails_env, 'production'

role :app, domain # multiple domains can be added here for parallel deployment (i.e. test_app)
role :web, domain
role :db,  domain, :primary => true

namespace :deploy do
  task :start, :roles => :app do
    run "touch #{release_path}/tmp/restart.txt"
  end

  task :stop, :roles => :app do
    # Do nothing.
  end

  desc "Restart Application"
  task :restart, :roles => :app do
    run "touch #{release_path}/tmp/restart.txt"
  end
end

deploy.task :cold do
  deploy.update
  deploy.create_db
  deploy.migrate
  deploy.restart # Change to start if we're using mongrels
end 

after "deploy:update_code", :update_config
after "deploy:restart", "delayed_job:restart"
after "deploy", "deploy:cleanup"

#links config files from shared to the release path and mongrel path after deployment
desc "Create all symlinks and files needed for app activation ofter deployment"
task :update_config, :roles => :web do
    run "ln -s -f /var/www/#{domain}/shared/database.yml #{release_path}/config/database.yml"
    run "ln -s -f /var/www/#{domain}/shared/app.yml #{release_path}/config/app.yml"
    run "ln -s -f /var/www/#{domain}/shared/cache #{release_path}/public/cache"
    run "ln -s -f /var/www/#{domain}/shared/survey_cache #{release_path}/public/surveys"
    run "ln -s -f /var/www/#{domain}/shared/surveys #{release_path}/surveys"
end

desc "changes ownership to cbdsm:git"
task :update_permissions, :roles => :web do
    sudo "chown -R #{user}:git /var/www/#{domain}"
end

namespace :delayed_job do
  desc "Start the delayed_job process"
  task :start, :roles => :app do
      run "cd #{current_path} && RAILS_ENV=#{rails_env} script/delayed_job -n 3 start"
  end

  desc "Stop the delayed_job process"
  task :stop, :roles => :app do
      run "cd #{current_path} && RAILS_ENV=#{rails_env} script/delayed_job stop"
  end

  desc "Restart the delayed_job process"
  task :restart, :roles => :app do
      delayed_job.stop
      delayed_job.start
  end
end

UPDATE: This seems to be a problem set :use_sudo, true. Removing that line and any commands which require sudo seemed to fix the problem. It’s still not entirely clear to me what changed–that made that line problematic. It worked fine before.

Additionally, I removed the default_run_options[:pty] = true line.

  • 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-11T05:19:36+00:00Added an answer on June 11, 2026 at 5:19 am

    As posted above:

    This seems to be a problem set :use_sudo, true. Removing that line and any commands which require sudo seemed to fix the problem. It’s still not entirely clear to me what changed–that made that line problematic. It worked fine before.

    Additionally, I removed the default_run_options[:pty] = true line.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I am reading a book about Javascript and jQuery and using one of the
I've got a string that has curly quotes in it. I'd like to replace
I have a small JavaScript validation script that validates inputs based on Regex. I
I have a French site that I want to parse, but am running into

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.