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/
- Write the Gemfile
- Install, with
bundle install
- Run:
bundle exec cap install
- 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
Ruby Method, Proc, and Block Confusion
Initializing Instance Variable as an Array - Ruby
Get Time from Datetime Variable in Ruby
Have a Parent Class's Method Access the Subclass's Constants
How to Use Fiddle to Pass or Return a Struct to Native Code
Error Connecting to Redis on 127.0.0.1:6379 (Errno::Econnrefused) - Wercker
Solving Dependency Constraints
Did I Install Ruby 1.9.3 Correctly on Rhel
"The Ruby Way" (Mixins and Class Reopening) VS. Dependency Injection
Re-Opened Nested Module Anomaly in Ruby
Sending Http Post Request in Ruby by Net::Http
Which Ruby Rest API Client for Neo4J
How to Connect to a Mongodb from Ruby Code
Use Same Controller for Multiple Routes
Running a Shell Command from Ruby: Capturing the Output While Displaying the Output
Sorting an Array of Arrays in Ruby
How to Make a Custom Environment in Rails a Default Environment