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
7
votes
3 answers

rbenv: version `2.2.3' is not installed (set by RBENV_VERSION environment variable)

When I run a deploy script, I'm having errors: [cb123fad] rbenv: version `2.2.3' is not installed (set by RBENV_VERSION environment variable) DEBUG [cb123fad] (Backtrace restricted to imported tasks) cap aborted! SSHKit::Runner::ExecuteError:…
Askar
  • 5,784
  • 10
  • 53
  • 96
7
votes
2 answers

capistrano 3 deploy:clean old releases permission error

I am trying to deploy my Yii application using capistrino 3. Sever is EC2 ubuntu instance which by default comes with a user ubuntu. I have added ubuntu user to group www-data and trying to deploy using capistrino 3 but in old releases these runtime…
hemc4
  • 1,623
  • 3
  • 18
  • 32
7
votes
1 answer

Capistrano deployment without internet access on server

How do I deploy a Rails app with Capistrano to a production or staging server which has no access to an external network or repository ? I've managed to get half way through the deployment and realised that Capistrano doesn't download the git repo…
victor
  • 1,626
  • 1
  • 14
  • 23
7
votes
1 answer

Rails 4, Capistrano 3 fail during bundle exec rake assets:precompile and returns rake stdout: Nothing

Deploying with Capistrano fail during rake assets:precompile: /usr/local/rvm/bin/rvm ruby-2.0.0-p353 do bundle exec rake assets:precompile The Prompt Respond with this error: INFO [b438501f] Running /usr/local/rvm/bin/rvm ruby-2.0.0-p353 do bundle…
7
votes
2 answers

Bundler with Capistrano doesn't generate a binary for DelayedJob

I'm using Bundler for a Rails app deployed by Capistrano. I'm trying to add the DelayedJob gem, but the bin/delayed_job file is missing from the remote server after I do a deploy. It exists on my local machine. I tried manually creating it with…
hattila91
  • 673
  • 7
  • 16
7
votes
1 answer

Capistrano 3 - Error: sorry, you must have a tty to run sudo

I've just upgraded Capistrano from v2 to v3.1. I've re-written my tasks including one that runs a shell script that restarts NGINX among other things. To restart NGINX I have to run as sudo which causes the error: Sorry, you must have a TTY to run…
ajtrichards
  • 29,723
  • 13
  • 94
  • 101
7
votes
2 answers

using dotenv variables inside capistrano 3 custom task

I'm trying to create capistrano task that will show a variable set by dotenv from .env file the task: namespace :test do task :env do on roles(:app) do info ENV['TEST_ENV'].inspect end end end .env…
Roy
  • 566
  • 3
  • 11
7
votes
3 answers

Capistrano 3 / SSHKit write to a file in custom task

I want mark the current deployed directory with my release number. I tried this approach: Get locally the app version, store it into a variable, and on the remote host, store it in a file. namespace :deploy do desc "Set a release number as the…
astropanic
  • 10,800
  • 19
  • 72
  • 132
7
votes
2 answers

Capistrano 3 assets:precompile takes hours. Stops at css file

Just as it says, I can't get capistrano 3 to do assets:precompile correctly. Even after hours, it still says writing to the .css file on the server. UPDATE: I was playing around and I tried a m1.medium. Same thing happened when it got to a…
moosilauke18
  • 921
  • 3
  • 8
  • 26
6
votes
1 answer

Capistrano 3.7 new SCM declaration is throwing errors

Based on the Readme here https://github.com/capistrano/capistrano/blob/v3.6.0/UPGRADING-3.7.md Updating the Gemfile and running bundle install works correctly. However, removing the :scm variable from deploy.rb and adding require…
Vincent Listrani
  • 123
  • 1
  • 1
  • 6
6
votes
3 answers

Rails/Nginx/Capistrano/Puma: (111: Connection refused) while connecting to upstream

I keep getting this error in the nginx.error.log: 2016/06/06 20:14:02 [error] 907#0: *1 connect() to unix:///home/user/apps/appname/shared/tmp/sockets/appname-puma.sock failed (111: Connection refused) while connecting to upstream, client:…
user2985898
  • 1,173
  • 1
  • 8
  • 21
6
votes
2 answers

capistrano-env file permissions

I use gem capistrano-env and found a small problem. My deploy script is: Capistrano::Env.use do |env| env.add 'DB_DSN', 'mysql:host=localhost;dbname=dbname' env.add 'DB_USER', 'user' env.add 'DB_PASS', 'pass' end And this code create .env…
stepozer
  • 1,143
  • 1
  • 10
  • 22
6
votes
2 answers

How can I get passenger-config restart-app to work?

Rails 4.1 on Ubuntu 14.04 with rbenv and ruby 2.2.1. Using capistrano with the capistrano-passenger gem, but the restart at the end fails: INFO [8213c63a] Running /usr/bin/env passenger-config restart-app /home/deployer/my_app…
croceldon
  • 4,511
  • 11
  • 57
  • 92
6
votes
3 answers

/usr/bin/env: ln: Too many levels of symbolic links

This problem is killing me and I feel like I've tried everything. First off, the problem started happening when upgrading to Capistrano 3. Capistrano now utilizes /usr/bin/env before every command when deploying, to make sure the environment setup…
mkralla11
  • 1,299
  • 1
  • 13
  • 19
6
votes
6 answers

Rails 4, capistrano 3, delayed_job - can't find bin/delayed_job on one of the servers

When i deploy to pre server everything's woking fine. But if i try to deploy to staging server i get this error: bundler: command not found: bin/delayed_job file - config/deploy/staging.rb set :rails_env, 'staging' set :eager_load, :true set…
Elmor
  • 4,775
  • 6
  • 38
  • 70