Questions tagged [capistrano]
Capistrano is a developer tool for deploying web applications. It is typically installed on a workstation, and used to deploy code from your source code management (SCM) to one, or more servers.
3,866
questions
0
votes
0
answers
10
views
setting operating environment for multiple deployments
Goal: have an entity have its own database but with the same underlying application on a single VPS.
• the VPS would have users created by an identifier value.
• deployment would have each entity ...
0
votes
1
answer
49
views
01 ArgumentError: Missing `secret_key_base` for 'production' environment, set this string with `bin/rails credentials:edit`
After copying the newly created master.key file from my dev server to the prod server, and running
cap production deploy
I get this error message:
00:13 deploy:assets:precompile
01 $HOME/.rbenv/bin/...
0
votes
2
answers
39
views
How can I use capistrano to auto-deploy to a secondary environment?
I already have a multi-environment capistrato deploy up and working. However, what I would like to do is set it up so that after a deploy to production, capistrano would automatically deploy the same ...
0
votes
2
answers
42
views
How to deploy a Rails app with Capistrano (different Ruby version on the server)
My server has Ruby 2.6.5 and there are some Rails applications which run on this server. I would like to deploy another Rails application to this server. My local machine (development machine) has ...
1
vote
1
answer
85
views
NameError: uninitialized constant Rails
On Rails 6 app I had Rails.application.credentials in cap deploy.rb file. Now, when I try to deploy the new app with Rails 7 I'm getting
# bin/bundle exec cap production deploy --trace
NameError: ...
0
votes
0
answers
30
views
deployin rails 7.0.4 api mode only to digital ocean ubuntu server 22.04 using capistrano
i am getting this error when i try to deploy on digital ocean.i have already checked my versions of ruby and rails on server they are same and i am using postgress db.
deploy:migrating
01 $HOME/...
0
votes
1
answer
57
views
Rails deploy fails, as SSHKit command failed
The latest in rails 6 deployment problems when compiling javascript assets. The error points to
1: from /Users/deploy/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sshkit-1.21.2/lib/sshkit/...
0
votes
2
answers
49
views
Capistrano gem. Compiling error. SSHKit::Command::Failed: rake exit status: 1
I'm attempting to deploy my project. Had no issues before but I'm suddenly getting the following error on compiling step.
00:10 deploy:assets:precompile
01 /usr/local/rvm/bin/rvm default do ...
3
votes
0
answers
136
views
Why does my gem work when installed from RubyGems.org, but not Github?
I'm trying to extract a couple of tasks into a gem, but cannot get the code to load in my Capfile. The code is at: https://github.com/floydj/capistrano-mysql_tables.
In my Gemfile:
gem "...
0
votes
1
answer
25
views
Using capistrano 3.16.0 then cap: command not found
I am able to install capistrano from my Gemfile gem 'capistrano', '~> 3.16.0'.
However, bash can't find the cap command.
Not sure how to fix this one, I am running bash on my MacBook Air M1.
0
votes
1
answer
102
views
Capistrano deploy suddenly stopped working (Git Permission denied)
I am using capistrano in order to deploy several projects to a VPS. I keep my remote repo in this case on bitbucket. This configuration has been working for years.
I have forwarding configured in my ...
0
votes
0
answers
107
views
Capistrano deployment stuck at assets:precompile
We are facing an issue with deploying our Rails app using Capistrano from a MacOS machine.
Capistrano runs inside a Docker container.
If I trigger the deployment from a Linux host machine (Capistrano ...
3
votes
0
answers
66
views
Run npm install in remote server with capistrano 3
i have a problem when i try to deploy my symfony application with in front angular.
When I run the following code on capistrano, I end up with the following error when I run the npm install :
cd /var/...
0
votes
1
answer
33
views
How set Bitbucket secret in symfony .env when deploy with capistrano
i trying to set my bitbucket secret in my .env file during the deployment with capistrano but unsuccessfully.
I try to export my secret and use envsubst on my .env with command task in capistrano and ...
0
votes
0
answers
34
views
Rails app - Capistrano deployment failing
I have an existing Rails application that is set up to use Capistrano for deployments. I'm adding a Staging environment to it, but running bundle exec cap staging deploy returns an error:
cap aborted!
...
0
votes
0
answers
68
views
capistrano : deploy:migrating - The deploy has failed with an error: stack level too deep
I'm beginer in Ruby Rails game, and today i try to setup my little website on a VPS.
I followed instruction, to setup a VPS on Digitalocean. I've already a simple rails app with a postgresql database.
...
0
votes
1
answer
193
views
puma:restart cap production deploy service not found
Rails 7.0.4
Puma 6.0
I am so close to getting cap production deploy to work in production but I'm stuck on puma:restart
I have an active service on the server
deploy@reports:~/apps/R7-reporting-2022/...
0
votes
1
answer
89
views
Capistrano - how to disable git pull (Bitbucket pipelines)
I have deploy via bitbucket pipelines, which is uses Capistrano for deploy release to server. But there is one problem, Capistrano is pulling actual version of branch, but i need to deploy not actual ...
0
votes
0
answers
34
views
Capistrano: no tty present and no askpass program specified
I'm trying to deploy a Rails app with Capistrano to my Ubuntu server.
Having these in my production.rb:
set :pty, false
set :use_sudo, false
set :ssh_options, { forward_agent: true, user: fetch(:user),...
0
votes
0
answers
20
views
Updating Capistrano symlinks to be dynamic rather then static
We currently use Capistrano to deploy our sites. We've recently run into a problem with our hosting provider that's causing us a rather large headache. Our hosts keep moving some of our cpanel sites ...
0
votes
0
answers
249
views
Problems starting application deployment in RAILS 7 with capistrano
I was following a tutorial to test how to deploy an application in Rails but when I tried to run it, it generated several errors that I was solving, first I clarify that I am working locally from ...
2
votes
1
answer
314
views
Capistrano asks for SSH password when it should use the SSH key
I have several Rails apps that use Capistrano.
When I sign in to the deployment server in the Terminal I'm prompted for the password of my ida_rsa ssh key and I can successfully sign into the server ...
0
votes
1
answer
107
views
Rails deploy by Capistrano can't find installed bundler version
I am trying to upgrade Ruby version of my project from 2.3.1 to 2.7.6. But Capistrano deployment fails with this error:
$ cap app_name deploy
* executing "cd /path/to/app/app_name/releases/...
1
vote
1
answer
95
views
Permission Error Setting Git URL with Capistrano
I'm trying to debug deploying with a new user. The setup currently works deploying as me, but not for bob.
error: could not lock config file config: Permission denied
INFO [097c7d60] Running /us/bin/...
0
votes
0
answers
203
views
rails aborted! NoMethodError: undefined method `[]' for nil:NilClass
basically i'm trying to deploy rails application through capistrano to ec2 instance and when i ran cap production reploy i get this error when cap tries to deploy db:migrate rails aborted!
...
0
votes
0
answers
30
views
Rails Capistrano deploy fails due ActiveRecord error
Recently I upgraded my Rails app from 4.2 to 5.2.
Since I tried 'cap deploy production',
"activerecord::connectionnotestablished, no connection Pool with 'primary' found" is being returned.
...
0
votes
0
answers
29
views
Changing settings to deploy aspnet app to ubuntu using Capistrano
I am helping a friend to update an application where the original developer has gone AWOL!
It appears to be about 3/4 years old, and I am unfamiliar with how it was deployed to the server. It looks to ...
0
votes
2
answers
175
views
Capistrano 3 asks for SSH user's password since `do-release-upgrade` was done on Ubuntu 20.04 server
I have a rails app that I could so far successfully deploy to my Ubuntu server using capistrano 3.
Last night I did a successful server update using do-release-upgrade:
Linux my-server 5.15.0-47-...
0
votes
2
answers
528
views
cap production deploy | ActiveSupport::MessageEncryptor::InvalidMessage Caused by: OpenSSL::Cipher::CipherError:
I'm trying to deploy a Ruby-on-Rails project to my own dedicated server (ubuntu 2004.2022.1.0).
I'm using Ruby 3.0.2, Rbenv, Capistrano 3.17.1, Puma, Nginx.
But I'm failing on the deploy step.
If ...
3
votes
1
answer
165
views
bundler: failed to load command: cap and wrong number of arguments error rails 6
Its showing me this error when I try to deploy it on staging my rails verison is Rails 6.1.4.4 and capistrano gem version is 3.11.0
Ruby version is 3.0.4.
It breaks everytime at deploy:check:...
1
vote
0
answers
28
views
Use pipenv on server with capistrano - Inappropriate ioctl for device
I have project which uses pipenv.
in local
pipenv works very useful.
$pipenv shell
$python manage.py runserver
I deploy the project with capistrano,
What I want to do is start pipenv shell start ...
0
votes
0
answers
120
views
Capistrano deployment - bundle exit status: 1
I recently deployed a rails 6.1 project to AWS with capistrano, all seems to be working well but when trying to deploy a new version including pdfkit and wkhtmltopdf it breaks at the bundler:install ...
0
votes
0
answers
55
views
I am getting this error message when trying to do "cap production deploy"
all...I am new in Rails development. can someone tell me why I am getting this error message when trying to do "cap production deploy" ---> Your bundle only supports platforms ["...
0
votes
1
answer
235
views
Inappropriate IOCTL for device when using capistrano in github-actions
I have the following yaml file set up for github-actions:
name: Build, Test, and Deploy to Staging
on:
push:
branches:
- develop
# Allows you to run this workflow manually from the ...
0
votes
0
answers
410
views
warning REMOTE HOST IDENTIFICATION HAS CHANGED
Yesterday I was trying to update my ruby on rails application by uploading it with capistrano but I had to cancel the upload in the middle of the process, immediately I was trying to access the server ...
0
votes
0
answers
51
views
Rails $HOME/.rbenv/bin/rbenv exec bundle exec rake db:migrate on staging server gives encryption error
When deploying to our staging server using capistrano it throws an error when trying to run the command (see the full error log at the end of this question)
$HOME/.rbenv/bin/rbenv exec bundle exec ...
1
vote
1
answer
151
views
Rails6: Post deployment application shows SyntaxError: Unexpected token 'export'
The application was working perfectly fine till the latest deployment which started showing error in Developers Tools and on every tab that I try to click in the application.
Deployment is done trough ...
0
votes
0
answers
33
views
Capistrano and Bundler fatal error: can't convert String into Integer
I'm trying to move an old Rails app (2.3) to another server with a fresh deploy using capistrano 2.15 and bundler 1.17.2.
When I run
bundle exec cap MY_SERVER deploy
It starts the deployment but ...
1
vote
1
answer
572
views
rails puma.sock failed (111: Connection refused) while connecting to upstream with Nginx app server
2022/07/13 10:24:33 [error] 617#617: *178 connect() to unix:/var/www/tuma_mizigo/shared/tmp/sockets/puma.sock failed (111: Unknown error) while connecting to upstream, client: 40.97.61.4, server: ...
1
vote
1
answer
267
views
error when uploading ruby on rails application with capistrano
I am trying to upload my application in aws created in ruby on rails with capistrano following this guide but at the moment of doing "cap production deploy "it shows me the following error:
...
1
vote
1
answer
540
views
SSHKit::Runner::ExecuteError on ruby 3.1.2
Hi
rails 7.0.3
ruby 3.1.2
both servers (production / staging) and the repository are on my own linux.
manually, i can ssh into production server and ssh from there to the repository server.
git clone ...
1
vote
0
answers
212
views
Update bundler version using capistrano
I've multiple servers and they are running the bundler version 2.1.4 and I want to upgrade the bundler to 2.3.5, so I tried to write the capistrano task
namespace :update_bundler do
desc "...
0
votes
0
answers
90
views
Unable to deploy with Capistarno, getting a permission denied error. Running sudo manually for previous steps worked
The error message I get is posted here. This issue seems to be due to lack of using sudo to run commands. I ran some of the previous commands manually with sudo and it worked. I am unable to do the ...
1
vote
1
answer
170
views
After restarting the server instance, Capistrano throws the error that Authentication failed for user Net::SSH::AuthenticationFailed
It is our maintenance project. We have got the private key(id_rsa.txt) of production server to sign-in from the client.
If we want to deploy the application, we just add the private key file to my ...
0
votes
0
answers
33
views
(SSHKit::Runner::ExecuteError) rake stdout: rake aborted!\r ActiveSupport::MessageEncryptor::InvalidMessage:
deploy.rb
set :linked_files, ['config/database.yml', 'config/credentials.yml.enc', 'config/master.key', 'config/storage.yml']
set :linked_dirs, %w[log tmp/pids tmp/cache tmp/sockets vendor/bundle ...
0
votes
1
answer
210
views
Bundler cannot find `whenever` gem, when deploying using capistrano
I am trying to deploy my app in a staging environment using Capistrano.
Running cap staging deploy results in error saying:
bundler: failed to load command: whenever (/home/ubuntu/builder/shared/...
3
votes
1
answer
797
views
Capistrano: Authentication failed for user ubuntu@xx.xxx.xxx.xxx (Net::SSH::AuthenticationFailed)
I can connect via ssh ubuntu@xx.xxx.xxx.xxx. but not via cap production deploy:check
current
set :user, "ubuntu"
set :ssh_options, { forward_agent: true }
server "xx.xxx.xxx.xxx",
...
1
vote
1
answer
153
views
How to clone a gem, fix it, add it to repo, bundle, and deploy with Rails
I have a Rails 5 app, it uses a gem, it no longer works in production. I fixed it, tried to add it to my local Gemfile by following this recipe:
https://gist.github.com/zulhfreelancer/...
0
votes
0
answers
28
views
AWS: Cannot cap deploy from bitbucket to AWS Server (user . Doesn’t exist)
Have been trouble shooting this, I am not sure if the issue is a change of AWS settings. I have done this before but this time, could not do a cap deploy as it keeps giving us an error that say, “user ...
3
votes
3
answers
1k
views
Capistrano Not recognizing secret_key_base in Rails production.enc
I'm using Capistrano to deploy my Rails 7.0.2 app with Ruby 3.1.1, when I run cap production deploy and then when Capistrano runs:
deploy:assets:precompile
$HOME/.rbenv/bin/rbenv exec bundle exec ...