0

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

どうすれば機能しますか?

4

3 に答える 3

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 を参照している行を見つけて削除します。

幸運を。

于 2010-06-24T13:42:16.627 に答える
0

みんな、ありがとう!Heroku 側の問題だったようです。私は彼らのサポートに連絡しましたが、彼らは何かをしなければなりませんでした。

それは今動作します。:)

于 2010-06-24T19:12:37.273 に答える
0

Heroku に gem "restful_authentication" をインストールしましたか? エラーメッセージは、それが存在しないことを示唆しています。

于 2010-06-19T22:10:14.553 に答える