【发布时间】:2011-03-18 17:12:12
【问题描述】:
我正在尝试在 rails 应用程序上部署一个 jruby。
现在我正在使用 mod_proxy 的反向代理运行 mongrel + Apache2。但是,由于 mongrel_jcluster 不适用于最新版本的 jruby,我只能运行一个 mongrel 服务器,并且无法利用 apache2 的负载平衡。
还有其他方法可以创建一个杂种集群吗?我真的更喜欢 mongrel cluster + apache2 而不是 java servlet 类型系统。
我已经按照此处的说明尝试了码头:http://jetty-rails.rubyforge.org/
但在启动码头服务器时出现以下错误,即使我已经检查了 jruby 下的 activerecord-jdbcmysql-adapter gem 版本及其那里和版本 0.9.7
DEPRECATION WARNING: require "activesupport" is deprecated and will be removed in Rails 3. Use require "active_support" instead. (called from /home/andrew/.gem/jruby/1.8/gems/activesupport-2.3.8/lib/activesupport.rb:2)
2010-07-20 17:00:46.820::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
Starting server 3000
2010-07-20 17:00:47.134::INFO: jetty-6.1.14
2010-07-20 17:01:03.511:/:INFO: Info: using runtime pool timeout of 30 seconds
2010-07-20 17:01:03.511:/:INFO: Info: received min runtimes = 1
2010-07-20 17:01:03.511:/:INFO: Info: received max runtimes = 5
Loading parser from serialized file lib/stanford-parser/englishPCFG.ser.gz ... done [4.6 sec].
2010-07-20 17:01:14.341:/:WARN: Error: unable to initialize application
org.jruby.rack.RackInitializationException: Please install the jdbcmysql adapter: `gem install activerecord-jdbcmysql-adapter` (no such file to load -- active_record/connection_adapters/jdbcmysql_adapter)
任何建议将不胜感激,谢谢!
编辑:我不知道这是否会有所不同,但我可以说在它崩溃之前,jetty_rails 成功加载了在 environment.rb 中声明的全局变量
编辑:这是我来自jruby -S gem list --local的完整宝石清单
*** LOCAL GEMS ***
actionmailer (2.3.8)
actionpack (2.3.8)
activerecord (2.3.8)
activerecord-jdbc-adapter (0.9.7)
activerecord-jdbcmysql-adapter (0.9.7)
activeresource (2.3.8)
activesupport (2.3.8)
builder (2.1.2)
gem_plugin (0.2.3)
jdbc-mysql (5.0.4)
jetty-rails (0.8.1)
jruby-jars (1.5.1)
jruby-openssl (0.7)
jruby-rack (1.0.1)
mizuno (0.3.6)
mongrel (1.1.5)
rack (1.1.0)
rails (2.3.8)
rake (0.8.7)
rubyzip (0.9.4)
sources (0.0.1)
warbler (1.1.0)
【问题讨论】:
标签: ruby-on-rails deployment jetty jruby mongrel