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
0 answers

can't find executable cap for gem capistrano

Although I bundle install without any issue, and I do have Capistrano in Gemfile: group :development do gem 'capistrano', '3.4.0' gem 'capistrano-rails' gem 'capistrano-sidekiq' gem 'capistrano-rvm' gem 'capistrano-passenger', '~> 0.2' …
simo
  • 23,342
  • 38
  • 121
  • 218
1
vote
0 answers

Capistrano Rails deploy - authentication error

I'm trying to deploy a Rails app onto a Digital Ocean Ruby on Rails droplet. I thought it would be all set up to go and I'd just have to configure the app. But it's actually just like a standard Linux server. I'm using this guide to set up the…
Michael
  • 139
  • 1
  • 13
1
vote
0 answers

Possible to access other stages variables in Capistrano?

Let's say I have 3 files for 3 stages: production.rb staging.rb and old.rb Is there any way in a rake task, when running something like deploy production transfer:site to access variables set in both production.rb and old.rb?
Octoxan
  • 1,949
  • 2
  • 17
  • 34
1
vote
0 answers

capistrano 3 error on rake assets precompile

i find out for days for this error but really stuck and the error capistrano gave were not rellay clear what's wrong: when the capistrano run this: $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile as myapp@myIP it only said: Caused…
srx lnx
  • 137
  • 1
  • 2
  • 9
1
vote
2 answers

rails - capistrano deployment of a subdirectory

I have a directory structure in git/github which looks like: demoapp - mockups - some_files - app (rails app) the github url for the app looks like git@github/user/demoapp.git Currently when I use capistrano to deploy, it looks for rake…
truthSeekr
  • 1,603
  • 4
  • 25
  • 44
1
vote
1 answer

Restarting services after Capistrano Rails deploy

I have my site being deployed with Capistrano. How can I get delayed_job and elasticsearch to restart after the deploy is complete?
rctneil
  • 7,016
  • 10
  • 40
  • 83
1
vote
0 answers

Cap deploy failing on precompile assets but cap deploy:precompile:assets works

I removed and then re-added a few files to github so that the gitignore would work, and then uploaded these files through capistrano to server. Then started having some deploy trouble failing on precompile:assets. I was able to find the issue, fix…
madav
  • 2,918
  • 1
  • 13
  • 17
1
vote
1 answer

Server specific details with Capistrano during deploy

I have a lot of servers running the same code with different configuration that i would like to deploy with Capistrano. The server configuration looks like this: role(:server) { ["127.0.0.1", {:name => "mymachine1"}] } role(:server) { ["127.0.0.2",…
orjan
  • 1,482
  • 1
  • 19
  • 35
1
vote
1 answer

Exclude the files to deploy by Capistrano

I deployed the project by capistrano from git. There are some files which are stored in git but not want to be copied to deploy server. in git, file structure. myapp - mainapp - somesetting.txt - _NoWanttoDeploy.txt // I…
whitebear
  • 11,200
  • 24
  • 114
  • 237
1
vote
0 answers

How to figure out how to fix with assets:precompile errors

I've got an probrem with deploy using rails + capistrano + EC2. I guess it is likely that there are some problem with assets:precompile but couldn't find out any helpfull errors. How can I fix this problem? Or I want to figure out what's…
1
vote
2 answers

How to see passenger+nginx logs on restart?

I deployed app after ruby update, and restarted passenger: passenger-config restart-app /home/deploy/my_app_staging --ignore-app-not-running After that I get 500 error: We're sorry, but something went wrong. The issue has been logged for…
Ruslan Coroliov
  • 103
  • 1
  • 13
1
vote
1 answer

Symlink single file via Moonshine and/or Capistrano on production server

My application is set up with Moonshine which configures the server, then uses Capistrano to deploy. However, there are some files and directories that are not source control managed that shouldn't be deleted when a new deploy is made, nor should…
Shannon
  • 2,744
  • 3
  • 28
  • 37
1
vote
4 answers

Deploy Rails App

I have been asked to make a few cosmetic changes to our production deployment. I have access to our linux box where I can see the files I need to change. I only need to change html.erb files, but when I add, for instance a simple

tag, it does…

Brian Daly
  • 587
  • 4
  • 15
1
vote
1 answer

rake is broken after setting up capistrano and deprec

Problem solved. Deprec is not related to the application. Its function is to prepare the server to accept the application. Removing deprec from my gemfile solved this problem. I can't answer my own question within 8 hours, so I'm putting it…
CHsurfer
  • 1,304
  • 1
  • 15
  • 34
1
vote
1 answer

Webpack Compile: Cannot find module '@babel/preset-env' when deploy production

i use capistrano to deploy my rails project( Rails 6.0.0, Ruby 2.6.0) i get bellow log when start `bundle exec cap production deploy ERROR in ./app/javascript/packs/application.js Module build failed (from…