When deploying with capistrano3 Could not locate Gemfile or .bundle/ directory
command: cap production whenever:clear_crontab The log shows: Command: cd && ( export RAILS_ENV="production" ; ~/.rvm/bin/rvm ruby-2.3.0@rails_gem do bundle exec whenever --clear-crontab rails_gem ) Could not locate Gemfile or .bundle/ directory
I'm having the same issue here.
I looks like it doesn't execute inside the release directory. This is an issue I've encountered several times with Capistrano now. If you deploy to the same server, you will set a specific deploy_to in the respective deploy config.
I added set :whenever_path, ->{ release_path } to my production.rb and staging.rb and it magically starts working again.
Using 1.0.0 and had the same problem. Fixed it by removing set :whenever_command, "bundle exec whenever". Looking at the code I see that this is the default and not needed for Capistrano v3.
The docs for Capistrano Integration do say:
Use the built-in Capistrano recipe for easy crontab updates with deploys. For Capistrano V3, see the next section.
But maybe the heading can be changed to Capistrano V2 Integration like v3's heading.