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.

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 running database migrations.

Capistrano is written in the Ruby language and is distributed using the RubyGems distribution channel. It is an outgrowth of the Ruby on Rails web application framework, but has also been used to deploy web applications written using other frameworks, including ones written in PHP.

Capistrano is implemented primarily for use on the bash command line. Users of the Ruby on Rails framework may choose from many Capistrano recipes; e.g. to deploy current changes to the web application or roll back to the previous deployment state.

Originally called SwitchTower, the name was changed to Capistrano in March 2006 because of a trademark conflict.

Resources:

Related tags:

Implementation specific tags

When you are asking a question about capistrano you could also add more specific tags. Here is the list of available tags:

Online Screencasts

  1. Codeschool Deployment: Capistrano - Part 1
  2. Codeschool Deployment: Capistrano - Part 2
  3. Railscasts Capistrano Tasks - Do you know how to make Capistrano tasks? See how to change default deployment behavior with custom tasks in this episode.
  4. Capistrano Tasks (revised) - Learn the basics of writing Capistrano tasks, how to set variables, and run commands on a remote server
3868 questions
1
vote
3 answers

Where do you set the IP address of the server to push the code to?

I'm reading the capistrano tutorial: https://github.com/capistrano/capistrano/wiki/2.x-From-The-Beginning Where do you set the i.p address of the server to push the code to? Does it assume you have an SSH key setup? What if you have 10 servers, is…
Blankman
  • 259,732
  • 324
  • 769
  • 1,199
1
vote
0 answers

Synch Rails Database for a Model with has_many association

Because of a fire on our Datacenter (for real), we setup a fresh server without any Datas in it, and our user started to use it despite it missing millions of datas. We may be able to get access to our backup quickly and I'm started to prepare the…
Toucouleur
  • 1,194
  • 1
  • 10
  • 30
1
vote
1 answer

Bundler via Capistrano on production seems to always unnecessarily reinstall everything

For some reason bundler isn't just installing needed gems not already installed. Instead it's re-installing everything in my Gemfile. Is there are way to get it to only install needed gems (they it works for me in development mode). Capistrano…
Michael K Madison
  • 2,242
  • 3
  • 21
  • 35
1
vote
1 answer

Rails capistrano /usr/bin/env no file or such directory

I have a RoR application and when i try to deploy to my server via capistrano, i got this error message /.rvm/gems/ruby-2.6.4@railsapp1/gems/sshkit-1.21.2/lib/sshkit/command.rb:97:in `exit_status=': bundle exit status: 127…
Loadd64
  • 57
  • 8
1
vote
0 answers

Capistrano deploy fail. Could not find 'bundler' (1.17.2) required by your /root/my_app.com/releases/20210216184029/Gemfile.lock

Im trying for the first time to set up a debian server (with puma, nginx, postgres sql and debian 10, a vps from hostinger) Im using capistrano, i prepared everything but when i make bundle exec cap production deploy it fail at the end and i have…
Joachim
  • 111
  • 8
1
vote
0 answers

Why files in config directory in shared path are deleting when copying these files from shared path to release path using Capistrano?

I am deploying a Dockerized Ruby on Rails application in AWS. I need to run the docker-compose commands on server via Capistrano script. Scenario 1: When I am trying to run docker-compose build command after deploy. namespace :deploy do task…
1
vote
2 answers

execute bash script inside deploy.rb using capistrano

I am learning (by doing) Rails and Capistrano. How can I execute a scrpit inside deploy.rb? I came across run(command), exec(command), execute: or run:. I don't have to specify :db or web so I have the following backbone: task :myTask do on…
aerijman
  • 2,522
  • 1
  • 22
  • 32
1
vote
1 answer

Why server does not down when capistrano restart puma

My question is knowledge question, it is not for fixing a bug or a task, I see when we use capistrano to deploy application to server, capistrano do many action like, pre complile, migrate, restart puma... I confuse while capistrano is working, my…
Bình Trương
  • 380
  • 1
  • 13
1
vote
0 answers

Capistrano fails compiling assets (or right after)

Whenever I try to deploy I get to deploy:assets:precompile and then things stop right at the "compiling..." step: INFO [2a7f255a] Finished in 16.140 seconds with exit status 0 (successful). DEBUG [26fcfc4a] Running if test ! -d…
tfantina
  • 788
  • 11
  • 37
1
vote
1 answer

Capistrano symlinking problem?

I've this capistrano command. task :symlink_shared do run "rm -rf #{current_path}/config/database.yml" run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml" run "rm -rf …
millisami
  • 9,931
  • 15
  • 70
  • 112
1
vote
0 answers

Rails assets manifest file (or backup file) not found

Solution: Added the following to the bottom of deploy.rb Rake::Task["deploy:assets:restore_manifest"].clear_actions before 'deploy:finishing_rollback', 'deploy:pre_start_precompile' task :pre_start_precompile do on roles(:db) do …
map7
  • 5,096
  • 6
  • 65
  • 128
1
vote
0 answers

Capistrano rbenv deploy gets stuck and doesn't print anything

Steps to reproduce cap production deploy and that's it, just gets stuck forever until I abort it Expected behavior Continue with deploying It must to print a TimeOut error log or something else Actual behavior When I run: cap production deploy it…
1
vote
3 answers

Rails/Capistrano tool to deploy static assets to Rackspace Cloud Files or Amazon Cloud Front?

Is anyone aware of a tool that will automatically deploy a Rails app static assets to Rackspace Cloud Files or Amazon Cloud Front? In my perfect world capistrano would automatically upload everything in javascripts, stylesheets, and images then…
Andrew Hopper
  • 956
  • 2
  • 9
  • 20
1
vote
3 answers

Capistrano Deploy fails with git: 'info' is not a git command

I setup a new project with Capistrano and although i can successfully run cap deploy:setup if i try to deploy my project I get the error below → cap deploy * executing `deploy' * executing `deploy:update' ** transaction: start * executing…
Schneems
  • 14,918
  • 9
  • 57
  • 84
1
vote
1 answer

Asset compilation searching the wrong path for Webpacker config files

I've added the webpacker gem to my Rails 5.2 app, and now I'm trying to deploy it to a server with Capistrano. The process fails during the deploy:assets:precompile step with the following error message: DEBUG [f2c62805] Command: cd…
Alexander
  • 3,959
  • 2
  • 31
  • 58