In order to bring up a textual description of a Capistrano task you can say cap -e taskname ... where taskname is the name of the task you're not sure...
There is a conflict between current capistrano versions and the 2.5.1 net-ssh gem. Make sure you upgrade to 2.5.2, then it should work again...
Note: capistrano_colors was merged into Capistrano starting from v2.13.5. However, this requires Ruby 1.9+. If you cannot upgrade Capistrano to 2.13.5+ (e.g. because you're still running on Ruby...
...simply put capistrano_colors into your Gemfile and require 'capistrano_colors' in your config/deploy.rb file...
If you have different users for different servers, don't use set :user. Encode the username into the server definition...
As we get ready to upgrade our servers I thought it’d be a good time to upgrade our deployment...
...and re-use the previous release's assets. [1] That is especially easy via Capistrano. Capistrano will automatically symlink your release's public/assets to a shared directory, so all you...
...deploy:assets:precompile task. Put the following code where you'd put other custom Capistrano tasks (default is lib/capistrano/tasks/*.rake) if ENV['SKIP_ASSETS'] Rake::Task['deploy:assets:precompile'].clear...
...to speed up deployment, asset precompilation can be skipped. This card automates the process. Capistrano 3 namespace :deploy do desc 'Automatically skip asset compile if possible' task :auto_skip_assets...
Installation Add this line to your application's Gemfile: gem 'capistrano', '~> 3.0' gem 'capistrano-maintenance', '~> 1.0' Add this line to you application's Capfile: require 'capistrano/maintenance'
...will make your application web-accessible again. Manual steps If you are still on capistrano 1, you can enable and disable the maintenance page manually. First, prepare a maintenance.html, for...
Running commands on multiple servers at the same time With a custom Capistrano task: CMD='zgrep -P "..." RAILS_ROOT/log/production.log' bundle exec cap production app:run_cmd See Capistrano...
...achieved and how to fix it. Theory When you deploy a new Ruby version with capistrano-opscomplete, it will take care of a few things: The new Ruby version is...
...anyway. Don't do this unless you absolutely need to. There is a taks in capistrano-opscomplete-0.6.4 which can do that for you (see below). In capistrano-opscomplete...
Carrierwave Go through our Carrierwave checklist if used. Maintenance Integrate and test the capistrano maintenance task. Accessibility Decide what effort you want to put in improving accessibility for physically...
gem 'bootstrap-sass' # If you want to use Bootstrap gem 'byebug' gem 'capistrano' gem 'capistrano-middleman', require: false config.rb activate :livereload activate :sprockets configure :build do activate :minify_css...
...Rails'ish webserver is already configured to deliver from. Note that you must not require capistrano-middleman manually, although stated in the gem's README. Doing so would screw the...
...the pack is application.js): = image_pack_tag('media/application/images/logo.png') Deployment Follow Configuring Webpacker deployments with Capistrano. Tests In your cucumber test, you will want to regenerate your assets before each test...
...only cleans up releases, not assets. In order to clean up assets, you can use capistrano-rails. Just require 'capistrano/rails' in Capfile and add the following config: # config/deploy.rb
...asset and remove any older versions. If you are using Webpacker, you need to configure capistrano-rails. If you are on Rails 3, you cannot use this to clean up...
...bundle exec rake assets:precompile. Remember to remove the folder public/packs afterwards. 11. Configure Capistrano and servers such that all servers share assets 12. Add a binstub for yarn if...
Remove require "sprockets/railtie" from application.rb Configure Deployment See Configuring Webpacker deployments with Capistrano. Deploy Check if your servers have the correct version of node and yarn installed.
...deployments, you only need to add storage to the linked_dirs in config/deploy.rb For Capistrano 2, add this to your config/deploy.rb: namespace :paperclip do desc "Create a storage folder for...
...before "deploy:setup", 'paperclip:create_storage' after "deploy:update_code", "paperclip:link_storage" For Capistrano 3, add the following (untested) to your config/deploy.rb: namespace :paperclip do desc "Create a storage...
etag { @@revision ||= File.read('REVISION') rescue nil } # Change all ETags after a new Capistrano release. etag { up.target } # Add this when you use Unpoly < 3 and optimize responses for render...
...algorithm instead of RSA (see Create a new SSH key pair), the deployment with Capistrano may fail with the following message: The deploy has failed with an error: unsupported key...
...be excluded from parallel runs, and run sequentially in a second run Support for Capistrano 2 AND 3 (will deploy without :migrations on Capistrano 3) Now requires a .firefox-version...
...Enable the given virtual host, disabling all others geordi ca[pistrano] COMMAND # Run a capistrano command on all deploy targets geordi cl[ean] # Remove unneeded files from the current directory...
...group :deploy do gem 'whenever', require: false end Add it to your config/deploy.rb: For Capistrano 2 set :application, 'PROJECT_NAME' # might be already set set :whenever_command, "bundle exec whenever...
...to run cronjobs on the :db server. That's just fine for us. For Capistrano 3 set :application, 'PROJECT_NAME' # might be already set set :whenever_roles , [:cron] set :whenever...
You can call bin/webpack explicitely to compile files to public/packs. When deploying with Capistrano this is done automatically by the compile:assets task. Why Webpacker sometimes does not re...
...your deploy.rb add this: require 'backports/1.9.2/array/select' Background You propably have an older version of Capistrano and thereby an older version of net-ssh which is used by Capistrano to connect...
...proxy env variable, Bundler will also look for a http_proxy env variable. With Capistrano Ideally the server you're deploying on exports an https_proxy variable for all shells...
...t have control over the server setup, you can also add this to your Capistrano config: set :bundle_env_variables, { 'https_proxy' => 'http://myproxy...
...will keep using the cached font and not see new icons. When deploying with capistrano, the following workaround will cause a new font file to be generate on every deploy...