Gemfile.lock 的权限被拒绝
我通过 Capistrano 在 Passenger 上部署应用程序时遇到问题。
我似乎无法摆脱来自bundler/definition.rb的权限被拒绝-/path/to/app/Gemfile.lock。以前有人有过这个吗?
我尝试过 chmoding 和 chowning 文件,但这没有帮助。
还有其他人遇到这个问题吗?
回溯是
/usr/local/rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.0/lib/bundler/definition.rb 184 in `initialize'
/usr/local/rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.0/lib/bundler/definition.rb 184 in `open'
/usr/local/rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.0/lib/bundler/definition.rb 184 in `lock'
/usr/local/rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.0/lib/bundler/environment.rb 39 in `lock'
/usr/local/rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.0/lib/bundler/runtime.rb 35 in `setup'
/usr/local/rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.0/lib/bundler.rb 100 in `setup'
更新:查看以下链接 - 此处后,我设法通过在开发上捆绑来解决该问题然后重新提交 Gemfile.lock。
I have got a problem deploying my app on Passenger through Capistrano.
I can't seem to shake off a Permission denied - /path/to/app/Gemfile.lock from bundler/definition.rb. Has anyone had this before?
I have tried chmoding and chowning the file but that hasn't helped.
Has anybody else had the problem?
Back trace is
/usr/local/rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.0/lib/bundler/definition.rb 184 in `initialize'
/usr/local/rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.0/lib/bundler/definition.rb 184 in `open'
/usr/local/rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.0/lib/bundler/definition.rb 184 in `lock'
/usr/local/rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.0/lib/bundler/environment.rb 39 in `lock'
/usr/local/rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.0/lib/bundler/runtime.rb 35 in `setup'
/usr/local/rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.0/lib/bundler.rb 100 in `setup'
UPDATE: After viewing the following link - here, I managed to fix the issue by bundling on dev and then recommiting the Gemfile.lock.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试删除 Gemfile.lock 并在服务器上运行
bundle install
。Try deleting the Gemfile.lock and running
bundle install
on your server.值得检查锁定文件的所有者。当我运行“sudo bundle install”时遇到了这个问题,因为我一直在为盒子上的所有用户安装 gemfiles。快速“chown”之后,一切都解决了。
It's worth checking the owner of the lock file. Ran into this when I'd been running 'sudo bundle install' because I'd been installing the gemfiles for all users on the box. A quick 'chown' later, and everything was sorted.