我正在尝试让我的更新后 git 挂钩停止服务器,从更新的存储库中提取更改,然后再次启动服务器。钩子正在运行,但它不断吐出错误。
以下是错误:
remote: RVM is not a function, selecting rubies with 'rvm use ...' will not work.
remote: You need to change your terminal emulator preferences to allow login shell.
...
remote: /home/user/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find thin (>= 0) amongst [] (Gem::LoadError)
...
remote: fatal: Not a git repository: '.'
这是更新后的文件:
#!/bin/sh
PATH=/home/... (the value of "echo $PATH" on the remote server)
rvm use 1.9.3
cd /home/project_directory
thin stop
git pull ../gitdirectory.git
thin start -e production -p 3000 -d
即使将 rvm 和 thin 替换为它们的确切位置,即“哪个 rvm”,也无法解决错误。
任何人都可以对这里出了什么问题有所了解吗?谢谢!