NameError uninitialized constant in Jruy/Rails 3
I'm upgrading a project to Rails 3.1 and Jruby 1.6.4 from rails 2.6 I followed the Rails Handbook by Jeremy.
Now I'm getting some errors while booting the server.
NameError in Adm::AuthController#login
uninitialized constant Sentry::Dispatcher::Dispatcher
The error log
Started GET "/admin/login/en/sentry" for 127.0.0.1 at Wed Oct 05 16:59:00 -0400
2011
Processing by Adm::AuthController#login as HTML开发者_如何学Python
Parameters: {"brand"=>"sentry", "language"=>"en"}
Completed 500 Internal Server Error in 9ms
NameError (uninitialized constant Sentry::Dispatcher::Dispatcher):
lib/sentry/dispatcher/application_dispatcher.rb:11:in `initialize'
app/controllers/application_controller.rb:90:in `before_interceptors'
Rendered C:/Users/matin/.pik/rubies/JRuby-164/lib/ruby/gems/1.8/gems/actionpack-
3.1.0/lib/action_dispatch/middleware/templates/rescues/_trace.erb (5.0ms)
Rendered C:/Users/matin/.pik/rubies/JRuby-164/lib/ruby/gems/1.8/gems/actionpack-
3.1.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb
(5.0ms)
Rendered C:/Users/matin/.pik/rubies/JRuby-164/lib/ruby/gems/1.8/gems/actionpack-
3.1.0/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within re
scues/layout (30.0ms)
This works for me..
while upgrading you need to include the class as well, like(in this case)
include 'sentry/dispatcher/dispatcher'
精彩评论