1

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'
  gem 'capistrano-slackify', require: false
  gem "letter_opener"
  gem 'web-console', '~> 2.0'
end

but, if I try to bundle exec cap deploy I get error:

/Users/samir/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0/bundler/rubygems_integration.rb:462:in `block in replace_bin_path': can't find executable cap for gem capistrano. capistrano is not currently included in the bundle, perhaps you meant to add it to your Gemfile? (Gem::Exception)
        from /Users/samir/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0/bundler/rubygems_integration.rb:493:in `block in replace_bin_path'
        from /Users/samir/.rvm/gems/ruby-2.3.3/bin/cap:22:in `<main>'
        from /Users/samir/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:24:in `eval'
        from /Users/samir/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:24:in `<main>'

Any idea?

simo
  • 23,342
  • 38
  • 121
  • 218
  • Did you run Capistrano installation already? (Run `bundle exec cap install`, see ["Capify" your project](https://github.com/capistrano/capistrano#capify-your-project).) I would also expect that you'd have to specify the environment where to deploy to, something like `bundle exec cap staging deploy`. Could that be the problem? – Josien Jul 23 '20 at 16:02
  • 2
    I had to explicitly set development group, as `bundle install --with development`, and then it worked.. – simo Aug 04 '20 at 14:56

0 Answers0