gpt4 book ai didi

java - Rails 3 中的路由错误

转载 作者:行者123 更新时间:2023-12-01 15:43:33 33 4
gpt4 key购买 nike

我正在升级在 Jruby 1.4 和rails 2.3 上运行的应用程序到 Rails 3.1.0 和 jruby 1.6。我按照 Rails 3 升级手册Jeremy,并使用插件rails_upgrade,但是当我启动服务器时我收到错误。喜欢

Routing Error
cannot load Java class com.mysentry.persistence.HibernateUtil

请有人帮助我。这是错误日志

Started GET "/admin/login/en/sentry" for 127.0.0.1 at Wed Sep 28 13:13:56 -0400
2011

ActionController::RoutingError (cannot load Java class com.mysentry.persistence.
HibernateUtil):
org/jruby/javasupport/JavaClass.java:1204:in `for_name'
org/jruby/javasupport/JavaUtilities.java:34:in `get_proxy_class'
C:/upgrade/jruby-1.6.4/lib/ruby/site_ruby/shared/builtin/javasupport/core_ext/
object.rb:46:in `java_import'
C:/upgrade/jruby-1.6.4/lib/ruby/site_ruby/shared/builtin/javasupport/core_ext/
object.rb:26:in `include_class'
lib/sentry/interceptor/transaction_interceptor.rb:5:in `Interceptor'
lib/sentry/interceptor/transaction_interceptor.rb:2:in `Sentry'
lib/sentry/interceptor/transaction_interceptor.rb:1:in `(root)'
org/jruby/RubyKernel.java:1038:in `require'
polyglot (0.3.2) lib/polyglot.rb:63:in `require'
activesupport (3.1.0) lib/active_support/dependencies.rb:240:in `require'
activesupport (3.1.0) lib/active_support/dependencies.rb:223:in `load_dependen
cy'
activesupport (3.1.0) lib/active_support/dependencies.rb:640:in `new_constants
_in'
activesupport (3.1.0) lib/active_support/dependencies.rb:639:in `new_constants
_in'
activesupport (3.1.0) lib/active_support/dependencies.rb:223:in `load_dependen
cy'
activesupport (3.1.0) lib/active_support/dependencies.rb:240:in `require'
lib/sentry/interceptor/transaction_interceptor.rb:7:in `Dispatcher'
lib/sentry/dispatcher/application_dispatcher.rb:3:in `Sentry'
lib/sentry/dispatcher/application_dispatcher.rb:2:in `(root)'
org/jruby/RubyKernel.java:1038:in `require'
polyglot (0.3.2) lib/polyglot.rb:63:in `require'

最佳答案

我怀疑您在 lib 或 Rails 2.3 自动加载的其他文件夹中存在 jar 文件,包括 hibernate jar

看看

http://hemju.com/2010/09/22/rails-3-quicktip-autoload-lib-directory-including-all-subdirectories/

您可能仍然需要在 jens 的评论中包含描述的要求。

关于java - Rails 3 中的路由错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7587104/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com