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:
/var/www/APPNAME/shared/bundle/ruby/2.4.0/bin/rake
exists on the VPS? And is your capistrano ssh user in the rvm group? Does your capistrano setup source the rvm environment before trying to call ruby scripts? – Camden Narzt