2011-06-07 31 views
1

我在为devise_invitable扩展这个奇怪的错误:未初始化的常量的ActiveSupport :: SecureRandom的

uninitialized constant ActiveSupport::SecureRandom 

但奇怪的是,我不知道该怎么反正加载模块,就像如果我控制台我执行ActiveSupport,多数民众赞成罚款,并true但不是SecureRandom类或ActiveSupport::SecureRandom响应,就像我知道的ActiveRecord的它的一部分,它在这里的文档:http://api.rubyonrails.org/classes/ActiveSupport/SecureRandom.html

你会如何开始疑难解答这样的问题吗?


更多详细信息

如此看来类SecureRandom作品原样,而不是在被称为像ActiveSupport::SecureRandom的ActiveSupport的一部分,这是什么原因会是什么?

+0

其中的Rails的版本是你吗? – 2011-06-07 20:05:46

+0

实际上我在边缘版本,所以这可能只是愚蠢的我的一部分,但无论如何。 – 2011-06-07 23:23:03

回答

3

我通过在我的3-1-stable Rails应用程序中切换到设计的master分支来解决这个问题。

gem 'devise', :git => "git://github.com/plataformatec/devise" 
2

我就遇到了这个问题与activeadmin宝石,用劈解决它在devise.rb顶部

ActiveSupport::SecureRandom = SecureRandom 

来源:http://coderwall.com/p/fttpra

相关问题