whenever icon indicating copy to clipboard operation
whenever copied to clipboard

When deploying with capistrano3 Could not locate Gemfile or .bundle/ directory

Open wy-ruby opened this issue 7 years ago • 2 comments

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

wy-ruby avatar Aug 22 '18 03:08 wy-ruby

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.

ClikeX avatar Sep 19 '18 08:09 ClikeX

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.

sshaw avatar May 25 '20 18:05 sshaw