0

I am trying to deploy my app in a staging environment using Capistrano.

Running cap staging deploy results in error saying:

bundler: failed to load command: whenever (/home/ubuntu/builder/shared/bundle/ruby/2.7.0/bin/whenever)

 DEBUG [52d26072]   Gem::Exception: can't find executable whenever for gem whenever. whenever is not currently included in the bundle, perhaps you meant to add it to your Gemfile?

I have already included whenever gem in the local Gemfile but still it is not able to find it: Here's a part of my Gemfile:

gem 'capistrano', 
gem 'capistrano-secrets-yml'
gem 'capistrano-rbenv'
gem 'capistrano-bundler'
gem 'capistrano-rails'
gem 'whenever', :require => false

I am not able to find what the problem is. Can you please help me?

Anas Ansari
  • 143
  • 2
  • 10

1 Answers1

0

I would try bundle exec cap staging deploy to make sure you are executing the command using your bundle. Additionally you may need to remove require => false because it does not include the library when you load your bundle.

Matthew Zagaja
  • 148
  • 1
  • 10