Git挂钩收到后耙:未找到

时间:2016-03-20 12:15:46

标签: git ruby-on-rails-4 nginx hook githooks

不知道为什么但是rake任务不适合我的git' post-receive'挂钩。

#!/bin/sh
git --work-tree=/var/www/static_app --git-dir=/var/repo/static_app.git checkout -f
rake db:migrate RAILS_ENV=production
rake assets:precompile RAILS_ENV=production
sudo service nginx restart

这是我在git push live

时获得的服务器日志
Counting objects: 15, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 777 bytes | 0 bytes/s, done.
Total 8 (delta 6), reused 0 (delta 0)
remote: hooks/post-receive: 3: hooks/post-receive: rake: not found
remote: hooks/post-receive: 4: hooks/post-receive: rake: not found
remote: Restarting nginx: nginx.
To ssh://root@xx.xxx.xxx.xx/var/repo/static_app.git
   178b5cc..4c3d726  master -> master

如何解决这个问题?

0 个答案:

没有答案