I have a RoR application and when i try to deploy to my server via capistrano, i got this error message
/.rvm/gems/ruby-2.6.4@railsapp1/gems/sshkit-1.21.2/lib/sshkit/command.rb:97:in `exit_status=': bundle exit status: 127 (SSHKit::Command::Failed)
bundle stdout: Nothing written
bundle stderr: /usr/bin/env: bundle: No such file or directory
this is happen when capistrano run task bundler:config (below)
00:52 bundler:config
01 bundle config --local deployment true
01 /usr/bin/env: bundle
01 : No such file or directory
can anyone help me with this ? My server is using ruby virtual env instead of rvm and rbnev
Edit:
I already install bundler, but to run it i have to..let's say activate the ruby first with this script
/home/myusername/rubyvenv/staging_rails__app1/2.6/bin/activate
And i already add that script into capistrano as the first task executed, but the error is still there, is there something that i miss ?
namespace :deploy do
before 'git:wrapper', :run_on_server
end
task :run_on_server do
on roles(:app) do
execute 'source /home/myusername/rubyvenv/staging_rails__app1/2.6/bin/activate'
end
end