Elmor
Elmor

Reputation: 4905

sh: bundle: error

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 !

Upvotes: 0

Views: 98

Answers (1)

mpapis
mpapis

Reputation: 53178

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

Upvotes: 1

Related Questions