ruby 1.8.7で動作する3(3.0.9)のアプリケーションがgem devise(1.4.2)で動作していますコンピュータは完璧に動作します。Heroku [警告] devise_forを提供しましたが、アプリケーションにモデルのユーザーが定義されていません
が、私はHerokuの上でそれをプッシュしようとしたと私はアプリケーションの負荷に次のエラーメッセージが表示されました:
[WARNING] You provided devise_for :users but there is no model User defined in your application
=> Booting WEBrick
=> Rails 3.0.9 application starting in production on http://0.0.0.0:43292
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/inflector/methods.rb:124:in `block in constantize': uninitialized constant User (NameError)
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/inflector/methods.rb:123:in `each'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/inflector/methods.rb:123:in `constantize'
from /app/vendor/bundle/ruby/1.9.1/gems/devise-1.4.2/lib/devise/mapping.rb:84:in `to'
from /app/vendor/bundle/ruby/1.9.1/gems/devise-1.4.2/lib/devise/mapping.rb:79:in `modules'
from /app/vendor/bundle/ruby/1.9.1/gems/devise-1.4.2/lib/devise/mapping.rb:88:in `strategies'
from /app/vendor/bundle/ruby/1.9.1/gems/devise-1.4.2/lib/devise.rb:410:in `block in configure_warden!'
from /app/vendor/bundle/ruby/1.9.1/gems/devise-1.4.2/lib/devise.rb:409:in `each_value'
from /app/vendor/bundle/ruby/1.9.1/gems/devise-1.4.2/lib/devise.rb:409:in `configure_warden!'
問題が工夫から来ているが、私はそれを修正する方法がわかりません。 私のモデルのユーザーは正しく定義されており、それは私のコンピュータで動作します... これを修正する方法を知っている人はいますか?あなたが綴られていることを確認するためにあなたのusers.rb内
展開する前にすべてをコミットしましたか? – apneadiving
はい、私はしました。 助けてくれてありがとう。私のモデルでは綴りが正しい。最後に、私は英雄の中で私のアプリを破壊し、それを再び押した...そして今それは正常に動作します。だから私はなぜこれが起こったのか知りません。おそらく私のコミットの1つが正しく行われていなかったでしょう。 しかし、ありがとう! – zelmarou
スペルミスがないかどうかを確認してください。 –