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
6
votes
2 answers

Capistrano destination path already exists, not an empty directory

While deploying a Rails app with Capistrano on Ubuntu 14.04, I am getting the following error: fatal: destination path '/var/www/APP-NAME/repo' already exists and is not an empty directory. cf5a389e] Running /usr/bin/env [ -f /var/www/rd/repo/HEAD…
red-devil
  • 1,064
  • 1
  • 20
  • 34
6
votes
1 answer

Rails 4: Capistrano development environment instead of production?

I am deploying the production environment of my ruby on rails application with the capistrano gem onto a virtual private server. I run the following command to deploy: bundle exec cap production deploy All seems to be working well unless I try to…
hec
  • 569
  • 1
  • 6
  • 12
6
votes
1 answer

Capistrano 3: Run task only on a single server from a pool of servers assigned a role

I have 20 servers that are in the "web" role. I have a task I need to perform on only one of them as the change affects shared storage. My current solution is a hack to get around this (below). Looking for a better way, I don't have a ton of ruby…
Jeff V
  • 165
  • 2
  • 9
6
votes
1 answer

Capistrano creating task to change current symlink

I am trying to setup Capistrano deployment for my website, I have got the deploy working, all authentication fine, but I host with Media temple so the default symlink will not work as apache won't have access to the path specified for current to the…
André Figueira
  • 6,048
  • 14
  • 48
  • 62
6
votes
2 answers

How to continue when script fails(errors) and capture the output using Capistrano 3

In Capistrano 2.x you could simply add :on_error => :continue like this: task :bad_script, :on_error => :continue do my_error = capture('/path/to/tomcat/shutdown.sh') end I don't see any way to do this in Capistrano 3.x or ssh-kit (the…
Richie Rich
  • 643
  • 1
  • 8
  • 17
5
votes
1 answer

Capistrano Exception while executing as username@servername: no implicit conversion of Array into String

I am in the process of trying to push my app to my server, I am running Rails 5.2 and Ruby 2.4.6 and Capistrano 3. My past app was running on the server side Rails 4.2. When I am trying to run cap production deploy:check --trace and getting: **…
Argent
  • 303
  • 1
  • 12
5
votes
1 answer

How to ssh as myuser, but run ALL Capistrano commands as deployuser within /home/deployuser

Background / The Problem Because of security configurations that I absolutely CANNOT change, I must ssh onto all of my boxes a federated user, myuser. EVERYTHING on my box that I need to deploy to is owned by deployuser and I absolutely CANNOT…
5
votes
3 answers

Rails: An unhandled lowlevel error occurred. The application logs may have details

I made this on my server: deploy@ubuntu-512mb-ams2-01:~/applications/spa_backend/current$ bundle exec rake secret 4b921910** deploy@ubuntu-512mb-ams2-01:~/applications/spa_backend/current$ export…
Pavel
  • 2,103
  • 4
  • 23
  • 41
5
votes
4 answers

Capistrano doesn't install

Whenever I try to run cap production deploy it fails at the following command [ebbf9fde] Command: cd /var/www/apps/my_app/releases/20150803171251 && /usr/local/rvm/bin/rvm 2.2.2 do bundle install --path /var/www/apps/my_app/shared/bundle --without…
Sana
  • 9,895
  • 15
  • 59
  • 87
5
votes
2 answers

"bash: bundle: command not found" - cap aborted

here is my deployment.rb file. # config valid only for current version of Capistrano lock '3.4.0' set :stage, 'production' set :application, "gobgob-ror" set :repo_url, 'git@github.com:narhamah/gobgob-ror.git' # Default branch is :master # ask…
Arup Rakshit
  • 116,827
  • 30
  • 260
  • 317
5
votes
1 answer

How to ignore files with Capistrano 3 without copy_exlude

In Capistrano 2 it was possible to exclude certain files that live in the Git repository with copy_exclude: set :copy_exclude, %w{.git .DS_Store web concept config lib} This isn't possible anymore in Capistrano 3. How can I exclude certain files…
Ole Spaarmann
  • 15,845
  • 27
  • 98
  • 160
5
votes
3 answers

Get a list of the set variables in Capistrano 3

I wonder if there is a simple way to get all the currently set variables in Capistrano 3? So if I have: set :user, "deploy" set :application, "someapp" I would like to get something like: all_variables # => { user: "deploy", application: "someapp",…
Dmitry Sokurenko
  • 6,042
  • 4
  • 32
  • 53
5
votes
2 answers

capistrano shared/bin folder is empty

I am using capistrano for deployment, and for some reason my shared/bin folder is empty, and, well it should contain -rails, rake, bundle, setup, spring. now obviously I did something wrong, but as I am new to capistrano, I have no Idea what it is,…
gilmishal
  • 1,884
  • 1
  • 22
  • 37
5
votes
1 answer

Capistrano v3 - Hook to run command post deploy

I am using Capistrano to deploy to a server running Nginx. I'm running into some issues with APC and I need to reload PHP-FPM after Capistrano has completed the deployment. The issue itself is outlined here but like that author I don't want to…
McNab
  • 6,767
  • 4
  • 35
  • 55
5
votes
2 answers

Running task before deploy:symlink:shared capistrano 3

I'm an absolute noob with Capistrano (v 3.2.1), so please forgive my, err, uselessness. I'm deploying a PHP app and wish to run composer install before the deploy:symlink:release task (only when not running a rollback) I'm having trouble accessing…
RichardTape
  • 20,865
  • 5
  • 24
  • 29