不知道为什么但是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
如何解决这个问题?