Questions tagged [capistrano3]

Capistrano is an open source tool for running scripts on multiple servers; its main use is deploying web applications. It automates the process of making a new version of an application available on one or more web servers, including supporting tasks such as changing databases.

Learn more from their website: http://capistranorb.com/

Online Screencasts

825 questions
116
votes
7 answers

Capistrano error tar: This does not look like a tar archive

INFO [050fe961] Running mkdir -p /home/rails/rails- capistrano/releases/20140114234157 on staging-rails DEBUG [050fe961] Command: cd /home/rails/rails-capistrano/repo && ( PATH=/opt/ruby/bin:$PATH GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/rails/git-ssh.sh…
Eric Francis
  • 23,039
  • 31
  • 88
  • 122
74
votes
1 answer

How to run shell commands on server in Capistrano v3?

I'm new to Capistrano and I've tried using Capistrano's DSL to run shell commands on the server ('run', 'execute', etc.), but it appears that it was deprecated. After searching and searching for a functional equivalent, I still am lost. Current…
Justin Godesky
  • 1,019
  • 1
  • 10
  • 17
61
votes
5 answers

Capistrano and environment variables

I've switched to using environment variables for configuration and it works very well - except when I have to deploy or run tasks with capistrano. Capistrano 3 seems to execute each command prefixed with /usr/bin/env which erases any environment…
53
votes
6 answers

How to restart puma after deploy?

I'm using Rails, Puma, Capistrano3. I have installed the gem capistrano3-puma as well. I started Puma with Puma Jungle https://github.com/puma/puma/tree/master/tools/jungle/upstart How do I restart Puma during deployment?
mystdeim
  • 4,802
  • 11
  • 49
  • 77
49
votes
7 answers

Ansible copy ssh key from one host to another

I have 2 app servers with a loadbalancer in front of them and 1 database server in my system. I'm provisioning them using Ansible. App servers has Nginx + Passenger and running for a Rails app. Will use capistrano for deployment but I have an issue…
beydogan
  • 1,102
  • 1
  • 11
  • 23
43
votes
5 answers

SSH Agent Forwarding not working

I'm having an hard time trying to configure Capistrano 3.1 to deploy an app hosted on Github. I'm following Capistrano Documentation and I have successfully completed the first step (SSH keys from workstation to servers) and on the second one (From…
Sig
  • 5,476
  • 10
  • 49
  • 89
33
votes
5 answers

Capistrano 3 sudo task

I want to write a recipe with Capistrano 3 executing a task on the remote server with sudo. With Capistrano 2 this could be done for example: default_run_options[:pty] = true task :hello do run "#{sudo} cp ~/something /something" end With…
crimi
  • 746
  • 1
  • 7
  • 8
33
votes
5 answers

Capistrano 3 execute within a directory

I'm trying to write a task for Capistrano 3 that involves executing 'composer install' within the directory of the current release. It looks something like this: namespace :composer do desc 'Install dependencies with Composer' task :install do …
Rahul Sekhar
  • 2,761
  • 5
  • 23
  • 27
25
votes
2 answers

How to integrate Capistrano with Docker for deployment?

I am not sure my question is relevant as I may try to mix tools (Capistrano and Docker) that should not be mixed. I have recently dockerized an application that is deployed with Capistrano. Docker compose is used both for development and staging…
Michaël Perrin
  • 5,903
  • 5
  • 40
  • 65
24
votes
2 answers

SSHKit::Runner::ExecuteError

$ bundle exec cap production deploy (Backtrace restricted to imported tasks) cap aborted! SSHKit::Runner::ExecuteError: Exception while executing as Psara@sakura: git exit status: 128 git stdout: Nothing written git stderr:…
Shion Yamaguchi
  • 601
  • 2
  • 8
  • 16
18
votes
7 answers

Rails 4 + Capistrano 3 : fatal: Could not read from remote repository while deploying

I am getting following error while deploying Rails 4 application using Capistrano 3 INFO [87512eb8] Running /usr/bin/env chmod +x /tmp/magnificent/git-ssh.sh as deploy@104.236.6.180 DEBUG [87512eb8] Command: /usr/bin/env chmod +x…
Amit Patel
  • 15,609
  • 18
  • 68
  • 106
18
votes
4 answers

Capistrano 3 SSHKit::Runner::ExecuteError: Exception while executing on host [hostname ]agent could not sign data with requested identity

I'm getting the following error while deploying my rails app to an ubuntu server, I have correctly setup ssh keys and I can ssh to the server but I'm getting the following when I try to do cap production deploy This is the error message cap…
Mutuma
  • 1,943
  • 3
  • 24
  • 33
17
votes
2 answers

NoMethodError: undefined method `on' for main:Object

when I try to bundle exec cap production deploy --trace I get an error message: deploy@h2540559:/www/apps/foodsoft$ bundle exec cap production deploy --trace ** Invoke production (first_time) ** Execute production ** Invoke load:defaults…
Maxiquester
  • 448
  • 1
  • 3
  • 9
17
votes
4 answers

How can I instruct Capistrano 3 to load my shell environment variables set at remote host?

I want to instruct Capistrano to load environment variables that are defined on remote server. How can I do that? It seems that when I export my environment variables inside .bashrc file, they are not taken into account by Capistrano. Capistrano…
p.matsinopoulos
  • 7,655
  • 6
  • 44
  • 92
16
votes
1 answer

Capistrano 3 deployment for Rails 4 binstubs conflict?

I am using Capistrano 3 with a newly generated Rails 4 app. My deployment is working, but when I run bundle exec rails console on the production server, I get a warning from Rails: Looks like your app's ./bin/rails is a stub that was generated by…
Andrew
  • 227,796
  • 193
  • 515
  • 708
1
2 3
54 55