Cap Command Not Found

Capistrano is installed but cap command not found

Ruby Gem's may not be as consistent as the use of Composer. I use Capistrano to deploy a number of my own sites (including Symfony), and mostly followed the instructions on the capistrano-symfony page: https://github.com/capistrano/symfony/

  1. Write the Gemfile
  2. Install, with bundle install
  3. Run: bundle exec cap install
  4. Edit the capistrano config, and run with bundle exec cap prod deploy to use the configurations at config/deploy.rb & config/deploy/prod.rb

cap command not found

Use rbenv rehash to make rbenv generate a binary shim for capistrano.

cap deploy + rbenv: bundle: command not found

It looks like rbenv is set to run Ruby 2.3.1. Several places in the log you have RBENV_VERSION="2.3.1". According to the rbenv documentation, you can find out how that was set with rbenv version. If you want to test Ruby 2.4.0, you'll need to point to that version. Alternatively, if you really mean to run on 2.3.1, you'll need to install bundler.

cap command not found [Cygwin + Capistrano]

I created a cap file in /usr/local/bin/ and made it executable.

$ cat /usr/local/bin/cap
#!/bin/bash
ruby ~/.gem/ruby/gems/capistrano-3.3.5/bin/cap "$@"

Location of capistrano gem files can be found using gem which capistrano.

I personally do not know if this is the best way of doing it, but I've just set it up yesterday and have managed to get it working for my usecase

Bitbucket pipeline: bash: cap: command not found

Okay. I managed to solve this problem by changing
cap staging deploy to bundle exec cap staging deploy.
Not sure why this could solve the problem, but anyway it works now.



Related Topics



Leave a reply



Submit