I'm deploying a Ruby on Rails / NodeJS application to a dedicated host using git's post-receive hook.
git checkout -f
/site/sys/post-receive.sh
My repository is in one folder, repo.git
and the actual files are copied to site
.
The problem is that RVM isn't in my path (I guess), so: bundle install
fails with bundle no such command
.
What should I do?
Full bundle error:
remote: /usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find bundler (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4] (Gem::LoadError)
remote: from /usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
remote: from /usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems.rb:1230:in `gem'
remote: from /usr/local/rvm/gems/ruby-1.9.3-p125/bin/bundle:18:in `<main>'