1

我正在将项目从 rails 2.6 升级到 Rails 3.1 和 Jruby 1.6.4 我遵循 Jeremy 的 Rails 手册。

现在我在启动服务器时遇到了一些错误。

 NameError in Adm::AuthController#login

 uninitialized constant Sentry::Dispatcher::Dispatcher

错误日志

 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
 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)
4

1 回答 1

0

这对我有用..

在升级时,您还需要包含该类,例如(在这种情况下)

  include 'sentry/dispatcher/dispatcher'
于 2011-10-07T22:08:13.960 回答