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,833
questions
0
votes
1
answer
14
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/...
0
votes
1
answer
15
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",
...
0
votes
1
answer
17
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
19
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 ...
1
vote
3
answers
95
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 ...
0
votes
0
answers
30
views
Rails does not provide a new application.css on staging environment
I am deploying my ruby rails application with capistrano and have an development, staging and production environment. On my development env everything works fine.
Now I've pushed my updates to our ...
3
votes
1
answer
151
views
Capistrano fail to deploy rails app due to incompatibility with OpenSSL 3.0
I have a rails application with Rails 7 and Ruby 3 support, which is working well in my development machine with Ubuntu 22.04, ruby 3.0.2p107 and Rails 7.0.2.3.
Now I'm trying to set up Capistrano (...
0
votes
0
answers
28
views
SSHKit::Runner::ExecuteError:Exception while executing as root@<server>co:Authentication failed for user root@<server> from Jenkins Job's shell script
I'm trying to run a cap deployment command from Jenkins Job. It is continuously throwing the following error. I have added the ssh key in deployment server as well. I'm able to deploy successfully ...
0
votes
0
answers
62
views
Upgrade bundler to 2.3.10 with gem install --default bundler:2.3.10
I am trying to upgrade bundler to 2.3.10 from 1.17.
I ran this command thru ansible:
/usr/local/rvm/bin/rvm {{ ruby_version }} do gem install --default bundler:{{ bundler_version }}
{{ ruby_version }...
0
votes
0
answers
30
views
Net::SSH::Exception: curve name mismatched (`' with `nistp256')
Using -
Ruby-2.7.3
Rails - 6.1.3
Use Capistrano gem for deployment but it throws below error -
/var/home/username/.rvm/gems/ruby-2.7.3@appname/gems/net-ssh-6.1.0/lib/net/ssh/transport/openssl.rb:144:...
1
vote
1
answer
99
views
How to configure capistrano to use local rsa key instead of ssh agent
I used capistrano to deploy my project using my local rsa key located at ~/.ssh/id_rsa. This always worked as expected.
Now I installed the development environment on a new computer, and now when I ...
1
vote
1
answer
41
views
passwordless sudo still requires password in capistrano
In capistrano script
set :stage, :production
set :branch, 'master'
server 'lion.example.jp', user: 'ubuntu', roles: %w(app),
set :user, "ubuntu"
namespace :deploy do
desc 'Collec ...
0
votes
1
answer
87
views
Auto restart the server after capistrano deploy
I have nginx + nginx unit + django python application , and django project is is deployed by capistrano
deploy.rb
lock "~> 3.16.0"
set :application, "mynavi"
set :branch, '...
1
vote
0
answers
118
views
Ruby on Rails: Cap production deploy not working
I finished my app thats running with Ruby on Rails on my local machine. Now I want to finally deploy it fallowing a video from Youtube (https://www.youtube.com/watch?v=xpYpaRUFzTI&t=888s).
When I ...
1
vote
1
answer
105
views
Gem installation failure when deploying using Capistrano
When trying to deploy a Rails application using Capistrano I receive this error:
An error occurred while installing mini_racer (0.6.2), and Bundler
cannot continue.
Make sure that `gem install ...
0
votes
1
answer
124
views
Capistrano deployment throws psych error: wrong number of arguments (given 4, expected 1) :`safe_load'
On my local machine the project works perfectly fine. Bundle install works fine and I can run the project locally. Till now, all my deployments were also working fine. But starting this deployment (no ...
0
votes
0
answers
32
views
Not reflected as deploy via capistrano using daemon
Now I'm transferring my environment following the below.
Environment
PreviousVersion
NewVersion
Rails
5.1.2
7.0.0
Ruby
2.4.1
3.0.0
capistrano
3.10.1
3.16.0
capistrano3-puma
3.1.1
5.2.0
puma
3.11....
0
votes
0
answers
25
views
php7.2-fpm restart is not working even after adding this in the deploy file of capistrano
I have added the php7.2-fpm restart script in capistrano deploy file, but still its not restarting and everytime the code is pushed site is going down and I have to ssh and run 'sudo service php7.2-...
0
votes
0
answers
136
views
Deploy via capistrano fail: "sudo: /bin/systemctl: command not found"
Now I'm transferring my environment following the below.
Environment
PreviousVersion
NewVersion
Rails
5.1.2
7.0.0
Ruby
2.4.1
3.0.0
capistrano
3.10.1
3.16.0
capistrano3-puma
3.1.1
5.2.0
...
0
votes
0
answers
61
views
Capistrano deploy used to work but now getting authentication failure
I know this probably looks like a repeat of this question, but believe me, this is slightly different.
I have been using Capistrano to deploy a Rails app for several years now, but as of last week I ...
0
votes
1
answer
41
views
Exec systemctl after deployment by capistrano
I want to restart Nginx-unit after deployment by Capistrano
namespace :deploy do
desc 'Collec Static Files'
task :collectImg do
on roles(:app) do
execute "sudo ...
0
votes
1
answer
92
views
Can't continue deploying after for while via capistrano
My environment is following the below.
Environment
Version
Rails
7.0.0
Ruby
3.0.0
capistrano
3.16.0
Production environment
Amazon EC2 Linux
After for while from deploying, I got these logs.
Then ...
1
vote
0
answers
28
views
ReactOnRails pre-rendering error after deploying web app with new Ruby and Node versions with Capistrano
Background of the problem
My website is a Rails webapp running the Sharetribe open source code, with Puma & React on Rails to pre-render components. It has a TopBarApp component built by ...
0
votes
0
answers
81
views
Capistrano sidekiq and multiple processes
I'm trying to set up multiple processes for my sidekiq using capistrano but the "sidekiq_processes" option seems to be removed in the 2.0 version of the gem capistrano-sidekiq, which I'm ...
1
vote
0
answers
89
views
rails app, how to add arm as a platform on deploy
I have a rails app and the Gemfile and Gemfile lock are part of the repo. Locally, we develop on Ubuntu x86, but we are trying to deploy to Ubuntu-arm (trying to take advantage of AWS cheaper ...
0
votes
1
answer
49
views
setup ROR application using puma nginx and capistrano
I'm trying to deploy ruby on rails application to the Amazon EC2 instance, using puma as an application server, nginx server and capistrano for deployments. Currently I'm stuck with the error message:
...
1
vote
1
answer
790
views
Unit puma_app_production.service has a bad unit file setting
When I start manually puma on the server - everything works as expected. But when I try to do it within Capistrano - I receive this error.
Failed to restart puma_app_production.service: Unit ...
1
vote
1
answer
462
views
Failure to restart puma after capistrano deployment
I'm trying to deploy a rails app from my machine to an aws linux ec2 using capistrano.
I used the bundle exec cap production deploy command and it actually deploys a new release to the server ...
1
vote
0
answers
104
views
Bug in the Ruby interpreter or extension libraries when deploying with capistrano
I've got a problem when trying to deploy by capistrano in Rails app.
Actually deploy's crashing when it's come to stage bundle exec rake assets:precompile.
I've searched whole internet to find the ...
0
votes
0
answers
151
views
The nvm version configured in capistrano task gets not applied
I have a capistrano task involving execution of npm commands and node scripts.
In deploy.rb, I define the node version I need to use:
set :nvm_type, :user
set :nvm_node, 'v12.18.3'
Unfortunately, the ...
1
vote
0
answers
94
views
Logs say "fe_sendauth: no password supplied" but rails console working without problems
I'm trying to deploy rails app with capistrano, nginx and puma. When I visit the app I get errors like this in my production.log:
[11c972c9-c8fb-404f-93c3-9fc614ad815b] ActiveRecord::...
1
vote
0
answers
23
views
Is it possible to run Dir.glob remotely with capistrano
When running a capistrano rake task, Dir.glob('paths/*/') is executed locally.
Is there a way to list remote folders with Dir.glob in order to run a command on each of them ?
This script should ...
0
votes
1
answer
158
views
capistrano, remote shell / nodejs / yarn doesnt work
having a issue: Yarn requires Node.js 4.0 or higher to be installed
by ssh into remote server, i have:
passwords@meet:/srv/passwords$ yarn -v
1.22.5
passwords@meet:/srv/passwords$ node -v
v16.9.1
...
0
votes
0
answers
52
views
How to deploy rails + react project with capistrano gem?
I'm trying to deploy rails + react project with capistrano gem, and it's getting 'write permission error' for /.bundle/config.
I have my react(frontend) + rails(backend) project structured as below:
...
0
votes
1
answer
126
views
Rails credentials with environment on Capistrano task
I'm using Rails credentials to store secret data on my Rails 6 app. There are 3 environments (dev, staging, production).
When I run cap staging deploy:my_task task always uses default key path (config/...
1
vote
1
answer
125
views
How to fix 'spring is not part of the bundle' when trying to run rails console in production
I'd like to be able to run rails console on an app installed with Capistrano(3).
So, I added gem 'capistrano-rails-console', require: false to the gemfile
the following to the deploy.rb
server 'ip', ...
1
vote
0
answers
77
views
capistrano cannot restart application with passenger
i have a rails 6 / ruby 2.7.2 app, and the passenger gem, app is working great in prod, but cap deploy chokes at the end with
01 *** ERROR: Phusion Passenger(R) doesn't seem to be running. If you ...
1
vote
0
answers
112
views
Problem deploying with capistrano. I can't restart puma with deploy user
I'm doing my first deployment in digital ocean. And almost at the end, capistrano raises a problem it says:
Running /usr/bin/env sudo /bin/systemctl restart puma_web_app_production as deploy@host
...
1
vote
0
answers
211
views
capistrano deployment with rbenv: /home/deploy/.rbenv/bin/rbenv: No such file or directory
I recently switched from rvm to rbenv on my ubuntu server. I have followed all instructions in the official documentation https://github.com/rbenv/rbenv. When I try to deploy with capistrano, I run ...
1
vote
0
answers
120
views
cap deployment not finding rbenv ruby version when it appears to be there
I am running an ubuntu instance on AWS with rails 2.5.8, and using capistrano to deploy. I recently switched from rvm to rbenv on my instance and am trying to get capistrano to deploy successfully. ...
0
votes
0
answers
71
views
Rails 6 deployment as development is effected as production
Having a clean slate with an application being deployed to a new VPS, I gradually stumbled upon some oddities.
log structures were definitely not of development mode type.
logs were being written to ...
1
vote
0
answers
460
views
Rails webpacker has no packs directory
Premable: as a Rails 6.1.3 application, on deployment, I noticed that migrations were not launched, thus there may be a capistrano issue at hand.
Being an initial deployment, shared files were copied ...
1
vote
0
answers
41
views
Handle deploy to multiple server by capistrano with keep same version
I am ruby on rails developer, I receive a question interview about deployment use capistrano, example if I have three server A, B, C. I know config help capistrano deploy to three server. But ...
0
votes
0
answers
49
views
capistrano deploy to one server and rsync to another servers
I'm using capistrano to deploy Magento 2 application. We want to deploy to one server first (qa1), and after deployment is finished on the first server, then we want to rsync the deployment on second ...
0
votes
1
answer
206
views
Capistrano cannot load such file -- net/scp (LoadError)
I've got an error while trying to deploy my project on DigitalOcean. When I run command 'cap production deploy' via deploy@ip - got this this error:
/usr/lib/ruby/2.7.0/rubygems/core_ext/...
0
votes
0
answers
82
views
Rails db:migrate command failed during Capistrano run
I have setup server with Capistrano and everything working fine, but I noticed it was not running migrations, so I have add as required 'capistrano/migrations' and now it doing but it is continuely ...
1
vote
0
answers
62
views
Webpacker not interpolating the environment correctly to get to the right config file for the environment
We recently upgraded webpacker in our project. Now when I deploy with capistrano, I get a compilation error like:
webpack config /path/to/project/releases/20210617155029/config/webpack/.js not found, ...
0
votes
0
answers
149
views
Rails application 'something went wrong' only on (certain) mobile phones
I'm struggling to debug this issue:
On certain phones (maybe all devices that open the page for the first time?) the app goes into 'something went wrong' mode.
My observations:
The loading time is ...
0
votes
1
answer
33
views
Change capistrano chmod task to deploy magento application
we have a capistrano for our magento application
The deploy are working fine from tools/cap/config/deploy.rb and run correctly each specific env we have like for example tools/cap/config/deploy/...
6
votes
2
answers
2k
views
Getting "warning: already initialized constant" on assets precompile at the time of cap deploy
Currently I am facing a weird warning messages on deploy:assets:precompile at production deploy through capistrano.
When I ran cap production deploy for first time deployment of my demo Rails project, ...