restful_authentication部署到Heroku - 名称错误

时间:2010-06-19 18:56:46

标签: ruby-on-rails heroku restful-authentication

当我将rails应用程序(使用restful_authentication)部署到Heroku时,我收到以下错误:

/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:105:in `const_missing': uninitialized constant User::Authentication (NameError)
 from /disk1/home/slugs/216145_64fa92e_1859/mnt/app/models/user.rb:4
 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
 from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require'
 from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:265:in `require_or_load'
 from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:224:in `depend_on'
 from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:136:in `require_dependency'
 from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:414:in `load_application_classes'
  ... 23 levels...
 from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval'
 from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize'
 from /home/heroku_rack/heroku.ru:1:in `new'
 from /home/heroku_rack/heroku.ru:1

我怎样才能让它发挥作用?

3 个答案:

答案 0 :(得分:0)

你在Heroku上安装了gem“restful_authentication”吗?错误消息表明它不存在。

答案 1 :(得分:0)

我在这里摸索,特别是因为你没有提出完整的追溯。

但是,可能与cache_template_extensions有关。

http://www.mail-archive.com/heroku@googlegroups.com/msg02172.html就您的问题进行了讨论,http://forums.pragprog.com/forums/66/topics/2484在升级到2.3.2时提到了这个问题。

底线:在代码(development.rb或其附近的某个地方)找到引用cache_template_extensions的行,然后将其删除。

祝你好运。

答案 2 :(得分:0)

谢谢大家!看起来这是Heroku结束时遇到的问题。我联系了他们的支持,他们必须做点什么。

现在有效。 :)