0

我正在使用 git 的 post-receive 挂钩将 Ruby on Rails / NodeJS 应用程序部署到专用主机。

git checkout -f
/site/sys/post-receive.sh

我的存储库位于一个文件夹中,repo.git实际文件复制到site.

问题是 RVM 不在我的路径中(我猜),所以:bundle install失败,bundle no such command.

我该怎么办?

完整捆绑错误:

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>'
4

1 回答 1

1

键入which bundle以查看可执行文件的确切位置。然后在 post 接收挂钩脚本中使用该绝对位置。

于 2012-05-06T22:34:00.673 回答