authlogic 因无限递归而崩溃
我在 Rails 应用程序中使用 authlogic 时遇到一些问题,因此我开始使用 github.com/binarylogic/ 中的空白示例authlogic_example 也不起作用。
我花了一天时间安装了 ruby 1.9.1 和 1.8 以及 jruby1.8,都没有用。有趣的是另一个 Rails 应用程序在我的服务器上运行。也就是说,我只是看不出代码在哪里中断或差异在哪里。这是给出shared/log/mongrel_debug/threads.log的输出:
Mon Oct 12 19:23:53 +0200 2009 REQUEST /favicon.ico
0.0.0.0:7102 -- THREADS: 1 -----
KEYS:
-- #<Thread:0x7ffe28347fc8>: [:started_on, :__recursive_key__]
请求后一段时间后,它超时并显示500。我是否正确地假设它是某段代码中的无限递归?
我的服务器配置是:
Linux xxxxxx 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:45:36 UTC 2009 x86_64
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
gem -v: 1.3.5
rails 2.3.4 (any lower version doesn't change it)
到目前为止,它不依赖于数据库或rails版本。再次启用该应用程序的唯一方法是注释掉 #acts_as_authenticated,因此我认为 authlogic 和我的服务器配置存在某种问题。在本地它仍然有效(OSX 10.6.1)
我在谷歌上搜索了几个小时并从头开始构建了一个 authlogic 应用程序。如果您知道我还可以搜索什么或可以查看什么,请给我提示!
预先非常感谢! 直到
I have some trouble with using authlogic in my rails app, so I began using the blank example from github.com/binarylogic/authlogic_example which doesn't work either.
I spent a day installing ruby 1.9.1 and 1.8 and jruby1.8, neither did work. The fun thing is that another rails app worked on my server. That said, I just cannot see where the code breaks or where the difference is. Here's the output that gives shared/log/mongrel_debug/threads.log:
Mon Oct 12 19:23:53 +0200 2009 REQUEST /favicon.ico
0.0.0.0:7102 -- THREADS: 1 -----
KEYS:
-- #<Thread:0x7ffe28347fc8>: [:started_on, :__recursive_key__]
After some time after the request it times out with a 500. Am I right assuming that it's an infitite recursion in some piece of code?
My server config is:
Linux xxxxxx 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:45:36 UTC 2009 x86_64
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
gem -v: 1.3.5
rails 2.3.4 (any lower version doesn't change it)
So far it doesn't depend on the database or the rails version. The only thing that enables the app again is commenting out the #acts_as_authenticated, so I assume that there's some kind of trouble with authlogic and my server conf. Locally it still works (OSX 10.6.1)
I searched google for some hours and built an authlogic app from scratch. If you have any idea what else I could search on or what I could check out, give me a hint!
Thanks a lot in advance!
Till
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
最后我找到了解决方案:
数据库名称和用户中有下划线,密码中有一些特殊字符。将其设置为更简单的解决方案。
Finally I found a solution:
the database name and user had an underscore in it and the password had some special chars in it. Setting it to an easier one solved it.
我的同事有另一种解释:
config.cache_classes = true
将其设置为 false 会有所帮助。
My coworker has another explanation:
config.cache_classes = true
Setting it to false helps it.