I am trying to deploy a Rails app from a Windows development machine to a Debian 9 VPS using Capistrano, Passenger, and RVM. I got RVM and Passenger set up with Apache on the VPS and Capistrano set up on the Windows machine. However, when I try to run cap production deploy
, I get the following error:
bundler: failed to load command: rake (/var/www/APPNAME/shared/bundle/ruby/2.4.0/bin/rake)
One quirk of developing on Windows is that the Gemfile.lock
must be edited on deployment to remove Windows-specific versions of gems. I have written a custom task to perform this action, which seems to run as expected.
Here are some files that might be useful:
The problem was resolved after I downgraded Bundler to version 1.12.5 (it was previously version 1.15.4). I assume there is some sort of conflict with my setup and newer versions of Bundler; but until the underlying issue is patched, I will continue using the older version.