Gemfile.lock 的权限被拒绝

发布于 2024-10-19 14:42:28 字数 910 浏览 3 评论 0原文

我通过 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

乖乖 2024-10-26 14:42:28

尝试删除 Gemfile.lock 并在服务器上运行 bundle install

Try deleting the Gemfile.lock and running bundle install on your server.

柳絮泡泡 2024-10-26 14:42:28

值得检查锁定文件的所有者。当我运行“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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文