Glassfish 找不到 activerecord-jdbc-adapter

发布于 2024-08-15 05:56:50 字数 542 浏览 1 评论 0原文

我尝试在 glassfish v3 上部署简单的 Rails 应用程序并收到以下错误:

org.jruby.rack.RackInitializationException: Could not find RubyGem activerecord-jdbc-adapter (>= 0)

环境详细信息: App使用warbler打包为war。 本地安装了 JRuby 1.4.0,并安装了 activerecord-jdbc-adapter gem。 应用程序配置为使用 derby 数据库(迁移成功):

development:
      host: localhost
      adapter: jdbc
      driver: org.apache.derby.jdbc.ClientDriver
      url: jdbc:derby://localhost:1527/railsdb
      username: rails
      password: rails

系统:Mac OS 10.6.2

I'm trying to deploy simple Rails app on glassfish v3 and get the following error:

org.jruby.rack.RackInitializationException: Could not find RubyGem activerecord-jdbc-adapter (>= 0)

Environment details:
App is packaged as war using warbler.
JRuby 1.4.0 installed locally, with activerecord-jdbc-adapter gem installed.
App is configured to use derby database (migration is successful):

development:
      host: localhost
      adapter: jdbc
      driver: org.apache.derby.jdbc.ClientDriver
      url: jdbc:derby://localhost:1527/railsdb
      username: rails
      password: rails

System: Mac OS 10.6.2

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

只想待在家 2024-08-22 05:56:50

通常你需要告诉 Warbler 将 gem 包含在 war 文件中。您可以通过将 gem 添加到您的 config/environment.rb 中来完成此操作,如下所示:

config.gem "activerecord-jdbc-adapter", :lib => false

或者确保您有一个 Warbler 配置文件('warble config')并添加以下条目:

config.gems << "activerecord-jdbc-adapter"

Usually you need to tell Warbler to include the gem in the war file. You can do this by either adding the gem to your config/environment.rb as follows:

config.gem "activerecord-jdbc-adapter", :lib => false

Or by ensuring you have a Warbler configuration file ('warble config') and adding the following entry:

config.gems << "activerecord-jdbc-adapter"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文