执行rails应用程序时出现以下错误:
Permission denied - /path/to/app/Gemfile.lock from bundler/definition.rb
:
Permission denied - /srv/www/app/releases/20110312182822/Gemfile.lock
Error message: Permission denied - /srv/www/app/releases/20110312182822/Gemfile.lock
Exception class: Errno::EACCES
Application root: /srv/www/app/current
我尝试过chmoding,chowining,删除Gemfile.lock,在服务器上运行bundle install ...
我在Google上找不到任何帮助。
任何提示?
我唯一怀疑的是我正在使用我的服务器的root帐户进行部署。嗯...
答案 0 :(得分:3)
解决:问题在于我是以root用户身份部署的。我回去在服务器上创建了一个“部署”用户,将其添加到sudoers,更改了应用程序目录的权限和所有权,然后重新部署。
有效。我正打算自己开枪。太糟糕了;现在,我将不得不寻找另一个借口。