OmniAuth +设计+ Rails 3 在生产中失败并出现 Error::EACCES
在我的本地计算机上,Google 身份验证工作正常,但是当我发布到 Dreamhost 上的生产服务器时,当我单击登录页面上的 Google 身份验证按钮时,出现以下错误。
Started GET "/auth/google?openid_url=https://www.google.com/accounts/o8/id" for [REMOVED IP] at Wed May 25 08:47:01 -0700 2011
Errno::EACCES (Permission denied - /tmp/associations/https-www.google.com-apdYYPrtQGUIj7Vp7jMTz.Kn74A-ZmpumY7Issy.P1r4_X0d6_oGqkI):
我暂时将 tmp 文件夹更改为 777,但仍然收到权限被拒绝的错误。我还能尝试什么?
TIA
On my local machine Google auth is working fine but when I release to my production server on Dreamhost I get the following error when I click on the Google auth button on my login page.
Started GET "/auth/google?openid_url=https://www.google.com/accounts/o8/id" for [REMOVED IP] at Wed May 25 08:47:01 -0700 2011
Errno::EACCES (Permission denied - /tmp/associations/https-www.google.com-apdYYPrtQGUIj7Vp7jMTz.Kn74A-ZmpumY7Issy.P1r4_X0d6_oGqkI):
I temporarily chmod'd the tmp folder to 777 but I still get the permission denied error. What else can I try?
TIA
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
确保您的 OpenID 文件存储设置正确,即..
OpenID::Store::Filesystem.new('./tmp')
(注意 /tmp 前面的 .)
Make sure your OpenID filestore is setup correctly, ie..
OpenID::Store::Filesystem.new('./tmp')
(Notice the . in front of the /tmp)
如果您无法让它与文件系统一起工作,很多人都使用数据库或 memcached 存储。
请参阅文档:
https://github.com/intridea/omniauth/wiki/OpenID-and -Google-Apps
此示例应用程序是为 Heroku 编写的,但问题是相同的(无法正确配置写入访问权限):
这个
希望 有帮助。
If you can't get it to work with the filesystem, a lot of people have used a database or memcached store.
See the documentation:
https://github.com/intridea/omniauth/wiki/OpenID-and-Google-Apps
This example app was written for Heroku, but the problem is the same (couldn't configure write access properly):
https://github.com/madhums/omniauth-on-heroku/
Hope this helps.