0
votes

I'm really frustrated - issue of capistrano not finding bundle has alot of questions & answers. but they don't seem to work for me... so sad :(
situation is - i'm using host which has system wide rvm installed.

$ bundle -v
Bundler version 1.2.4

$ rvm -v
rvm 1.18.8 (stable) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]

$ ruby -v
ruby 1.9.3p385 (2013-02-06 revision 39114) [i686-linux]

and error is it can't execute sh: bundle: http://community.webfaction.com/questions/5186/capistrano-cant-find-bundle
Ive tried setting rvm variables

  set :rvm_ruby_string, "1.9.3"
    set :rake,            "rvm use #{rvm_ruby_string} do bundle exec rake"
    set :bundle_cmd,      "rvm use #{rvm_ruby_string} do bundle "

Then i tried setting :default_environment like so http://community.webfaction.com/questions/5186/capistrano-cant-find-bundle

Tried setting to combined output of which ruby & ecno $HOME it still doesn't work. Any ideas? The problem seems quite widespread... but i can't fix it!

UPDATE 1
tried using rvm solution https://rvm.io/integration/capistrano/

set :default_environment, {
'PATH' =>"/home/h41319/data/www/.rvm/gems/ruby-1.9.3-p385@global/bin/bundle::/home/h41319/data/www/.rvm/gems/ruby-1.9.3-p385@global/bin/ruby:PATH",
'RUBY_VERSION' => 'ruby 1.9.3', 'GEM_HOME' => '/home/h41319/data/.rvm/gems/ruby-1.9.3-p385', 'GEM_PATH' => '/home/h41319/data/.rvm/gems/ruby-1.9.3-p385@global',
'BUNDLE_PATH' => '/home/h41319/data/www/.rvm/gems/ruby-1.9.3-p385@global/bin/bundle' # If you are using bundler. }

No luck !

1
Can be some issues with your paths. I am not too familiar with the paths on linux, so I really can't help you too much. On windows you would set a system variable and add something like this "....; C:/path/to/ruby/bin;" then you are a small reboot/restart of terminal away from happiness.Automatico
is it working without capistrano?phoet
I can check versions of ruby and bundler over sshElmor

1 Answers

1
votes

Have a look on rvm-capistrano gem, the documentation should be clear about how to use it => https://github.com/wayneeseguin/rvm-capistrano#readme