首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >JRuby Rails3千里达/Jetty_Rails在最简单的安装中失败-感觉就像2瓦灯泡一样昏暗

JRuby Rails3千里达/Jetty_Rails在最简单的安装中失败-感觉就像2瓦灯泡一样昏暗
EN

Stack Overflow用户
提问于 2011-02-09 11:54:43
回答 1查看 3K关注 0票数 2

好的。我在尝试让JRuby/Rails3与jetty和tomcat一起运行时感到非常沮丧。尝试在OS-X上本地安装jruby/rails3和jetty/tomcat应用程序。(并最终到达Ubuntu阶段和实时服务器)我在启动时总是得到的错误是

代码语言:javascript
复制
Could not find activerecord-jdbc-adapter-1.1.1 in any of the sources
Try running `bundle install`.

我试着用谷歌搜索一下自己,试图找出为什么会发生这种情况。一位消息人士提到了“bundler”的一个问题,但没有给出任何版本信息。大多数人给出了不同的选项来更改Gemfile,我在过去的5个小时里一直在尝试,但都没有成功。

恼火的是,我决定从一个简单的安装开始。

将jruby安装在/opt/jruby-1.6.0.RC1/中,并带有/opt/jruby的符号链接。已安装的Gems:

代码语言:javascript
复制
jruby -S gem list

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.3, 2.3.5)
actionpack (3.0.3, 2.3.5)
activemodel (3.0.3)
activerecord (3.0.3, 2.3.5)
ActiveRecord-JDBC (0.5)
activerecord-jdbc-adapter (1.1.1)
activerecord-jdbcmysql-adapter (1.1.1)
activeresource (3.0.3, 2.3.5)
activesupport (3.0.3, 2.3.5)
arel (2.0.8, 2.0.7, 2.0.6)
bouncy-castle-java (1.5.0145.2)
builder (2.1.2)
bundler (1.0.10)
daemon_controller (0.2.5)
erubis (2.6.6)
fastthread (1.0.7)
file-tail (1.0.5)
gem_plugin (0.2.3)
htmlentities (4.2.4)
i18n (0.5.0)
jdbc-mysql (5.1.13)
jetty-rails (0.8.1)
jruby-jars (1.5.6)
jruby-openssl (0.7.3)
jruby-rack (1.0.5)
mail (2.2.15, 2.2.12)
mime-types (1.16)
mongrel (1.1.5 java)
nokogiri (1.4.1 java)
passenger (3.0.2)
polyglot (0.3.1)
rack (1.2.1, 1.0.1)
rack-mount (0.6.13)
rack-test (0.5.7, 0.5.6)
rails (3.0.3, 2.3.5)
railties (3.0.3)
rake (0.8.7)
ruby-mp3info (0.6.13)
rubyzip (0.9.4)
sources (0.0.1)
spruz (0.2.5)
thor (0.14.6)
treetop (1.4.9)
trinidad (1.0.5)
trinidad_jars (1.0.0)
tzinfo (0.3.24, 0.3.23)
warbler (1.2.1)

正如你所看到的,我已经安装了相当多的gem来让它工作。叹息..。可能是ActiveRecord-JDBC?

无论如何,转到dev文件夹:

代码语言:javascript
复制
cd ~/dev_folder
jruby -S rails new test_app --database mysql --template http://jruby.org
...the normal create/apply/gsub output...
cd test_app
bundle install
...normal bundle output...
Using activerecord (3.0.3) 
Using activerecord-jdbc-adapter (1.1.1) 
Using activeresource (3.0.3) 
Using bundler (1.0.10) 
Using jdbc-mysql (5.1.13) 
...rest of bundle output...

现在启动千里达,例如:

代码语言:javascript
复制
jruby -S trinidad
Feb 9, 2011 1:36:13 PM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["http-bio-3000"]
Feb 9, 2011 1:36:13 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Feb 9, 2011 1:36:13 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.6
Feb 9, 2011 1:36:13 PM org.apache.catalina.startup.ContextConfig webConfig
INFO: No global web.xml found
Feb 9, 2011 1:36:15 PM org.apache.catalina.core.ApplicationContext log
INFO: Info: using runtime pool timeout of 30 seconds
Feb 9, 2011 1:36:15 PM org.apache.catalina.core.ApplicationContext log
INFO: Info: received min runtimes = 1
Feb 9, 2011 1:36:15 PM org.apache.catalina.core.ApplicationContext log
INFO: Info: received max runtimes = 5
Could not find activerecord-jdbc-adapter-1.1.1 in any of the sources
Try running `bundle install`.
Exception in thread "JRuby-Rack-App-Init-0" org.jruby.exceptions.MainExitException: aborted
Feb 9, 2011 1:36:45 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["http-bio-3000"]
^C

或jetty_rails:

代码语言:javascript
复制
jruby -S jetty_rails
2011-02-09 13:44:10.122::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
Starting server 3000
2011-02-09 13:44:10.272::INFO:  jetty-6.1.14
2011-02-09 13:44:11.045:/:INFO:  Info: using runtime pool timeout of 30 seconds
2011-02-09 13:44:11.045:/:INFO:  Info: received min runtimes = 1
2011-02-09 13:44:11.045:/:INFO:  Info: received max runtimes = 5
Could not find activerecord-jdbc-adapter-1.1.1 in any of the sources
Try running `bundle install`.
Exception in thread "JRuby-Rack-App-Init-0" org.jruby.exceptions.MainExitException: aborted
^C

我将在一个新文件夹中重新安装jruby,并安装绝对最小的gem,然后再次尝试相同的操作。

同时,如果有人知道为什么会发生这种情况,请发帖,因为我相信我不是唯一一个这样做的人……

金宝。

阿。嗯。好的。这是一个完整的“从裸机”安装的文字记录。

我归档了我以前安装的jruby,并从tarball中将其重新解压,然后:

代码语言:javascript
复制
jruby -S gem install rails
JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
Fetching: activesupport-3.0.4.gem (100%)
Fetching: builder-2.1.2.gem (100%)
Fetching: i18n-0.5.0.gem (100%)
Fetching: activemodel-3.0.4.gem (100%)
Fetching: rack-1.2.1.gem (100%)
Fetching: rack-test-0.5.7.gem (100%)
Fetching: rack-mount-0.6.13.gem (100%)
Fetching: tzinfo-0.3.24.gem (100%)
Fetching: abstract-1.0.0.gem (100%)
Fetching: erubis-2.6.6.gem (100%)
Fetching: actionpack-3.0.4.gem (100%)
Fetching: arel-2.0.8.gem (100%)
Fetching: activerecord-3.0.4.gem (100%)
Fetching: activeresource-3.0.4.gem (100%)
Fetching: mime-types-1.16.gem (100%)
Fetching: polyglot-0.3.1.gem (100%)
Fetching: treetop-1.4.9.gem (100%)
Fetching: mail-2.2.15.gem (100%)
Fetching: actionmailer-3.0.4.gem (100%)
Fetching: thor-0.14.6.gem (100%)
Fetching: railties-3.0.4.gem (100%)
Fetching: bundler-1.0.10.gem (100%)
Fetching: rails-3.0.4.gem (100%)
Successfully installed activesupport-3.0.4
Successfully installed builder-2.1.2
Successfully installed i18n-0.5.0
Successfully installed activemodel-3.0.4
Successfully installed rack-1.2.1
Successfully installed rack-test-0.5.7
Successfully installed rack-mount-0.6.13
Successfully installed tzinfo-0.3.24
Successfully installed abstract-1.0.0
Successfully installed erubis-2.6.6
Successfully installed actionpack-3.0.4
Successfully installed arel-2.0.8
Successfully installed activerecord-3.0.4
Successfully installed activeresource-3.0.4
Successfully installed mime-types-1.16
Successfully installed polyglot-0.3.1
Successfully installed treetop-1.4.9
Successfully installed mail-2.2.15
Successfully installed actionmailer-3.0.4
Successfully installed thor-0.14.6
Successfully installed railties-3.0.4
Successfully installed bundler-1.0.10
Successfully installed rails-3.0.4
23 gems installed

安装其他gem:

代码语言:javascript
复制
jruby -S gem install jruby-openssl
JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
Fetching: bouncy-castle-java-1.5.0145.2.gem (100%)
Fetching: jruby-openssl-0.7.3.gem (100%)
Successfully installed bouncy-castle-java-1.5.0145.2
Successfully installed jruby-openssl-0.7.3
2 gems installed

jruby -S gem install activerecord-jdbc-adapter 
Fetching: activerecord-jdbc-adapter-1.1.1.gem (100%)
Successfully installed activerecord-jdbc-adapter-1.1.1
1 gem installed

jruby -S gem install trinidad
Fetching: trinidad_jars-1.0.0.gem (100%)
Fetching: jruby-rack-1.0.5.gem (100%)
Fetching: trinidad-1.0.5.gem (100%)
Successfully installed trinidad_jars-1.0.0
Successfully installed jruby-rack-1.0.5
Successfully installed trinidad-1.0.5
3 gems installed

jruby -S gem install jetty-rails
Fetching: jetty-rails-0.8.1.gem (100%)
PostInstall.txt
Successfully installed jetty-rails-0.8.1
1 gem installed

jruby -S gem list

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.4, 2.3.5)
actionpack (3.0.4, 2.3.5)
activemodel (3.0.4)
activerecord (3.0.4, 2.3.5)
activerecord-jdbc-adapter (1.1.1)
activerecord-jdbcmysql-adapter (1.1.1)
activeresource (3.0.4, 2.3.5)
activesupport (3.0.4, 2.3.5)
arel (2.0.8)
bouncy-castle-java (1.5.0145.2)
builder (2.1.2)
bundler (1.0.10)
erubis (2.6.6)
i18n (0.5.0)
jdbc-mysql (5.1.13)
jetty-rails (0.8.1)
jruby-openssl (0.7.3)
jruby-rack (1.0.5)
mail (2.2.15)
mime-types (1.16)
nokogiri (1.4.1 java)
polyglot (0.3.1)
rack (1.2.1, 1.0.1)
rack-mount (0.6.13)
rack-test (0.5.7)
rails (3.0.4, 2.3.5)
railties (3.0.4)
rake (0.8.7)
ruby-mp3info (0.6.13)
sources (0.0.1)
thor (0.14.6)
treetop (1.4.9)
trinidad (1.0.5)
trinidad_jars (1.0.0)
tzinfo (0.3.24)

jruby -S rails new TestApp --database=mysql --template http://jruby.org
create  
create  README
...
blah blah...
...
create  vendor/plugins
create  vendor/plugins/.gitkeep
apply  http://jruby.org
apply    http://jruby.org/templates/default.rb
gsub      Gemfile
gsub      config/database.yml

cd TestApp
cat Gemfile
source 'http://rubygems.org'

gem 'rails', '3.0.4'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

platforms :ruby do
  gem 'mysql2'
end

platforms :jruby do
  gem 'activerecord-jdbc-adapter'
  gem 'jdbc-mysql', :require => false
end
...blah blah...

cat config/database.yml 
...elided...
development:
  adapter: mysql
  encoding: utf8
  reconnect: false
  database: TestApp_development
  pool: 5
  username: root
  password:
  socket: /tmp/mysql.sock
...elided...

bundle install
Fetching source index for http://rubygems.org/
Using rake (0.8.7) 
Using abstract (1.0.0) 
Using activesupport (3.0.4) 
Using builder (2.1.2) 
Using i18n (0.5.0) 
Using activemodel (3.0.4) 
Using erubis (2.6.6) 
Using rack (1.2.1) 
Using rack-mount (0.6.13) 
Using rack-test (0.5.7) 
Using tzinfo (0.3.24) 
Using actionpack (3.0.4) 
Using mime-types (1.16) 
Using polyglot (0.3.1) 
Using treetop (1.4.9) 
Using mail (2.2.15) 
Using actionmailer (3.0.4) 
Using arel (2.0.8) 
Using activerecord (3.0.4) 
Using activerecord-jdbc-adapter (1.1.1) 
Using activeresource (3.0.4) 
Using bundler (1.0.10) 
Using jdbc-mysql (5.1.13) 
Using thor (0.14.6) 
Using railties (3.0.4) 
Using rails (3.0.4) 
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

现在创建数据库:

代码语言:javascript
复制
mysql> CREATE DATABASE TestApp_development DEFAULT CHARACTER SET utf8;
Query OK, 1 row affected (0.05 sec)

mysql> CREATE DATABASE TestApp_test DEFAULT CHARACTER SET utf8;
Query OK, 1 row affected (0.00 sec)

mysql> CREATE DATABASE TestApp_production DEFAULT CHARACTER SET utf8;
Query OK, 1 row affected (0.02 sec)

使用WEBrick进行测试:

代码语言:javascript
复制
jruby -S rails server
=> Booting WEBrick
=> Rails 3.0.4 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2011-02-09 14:40:40] INFO  WEBrick 1.3.1
[2011-02-09 14:40:40] INFO  ruby 1.8.7 (2011-01-10) [java]
[2011-02-09 14:40:40] INFO  WEBrick::HTTPServer#start: pid=25549 port=3000
Started GET "/rails/info/properties" for 0:0:0:0:0:0:0:1%0 at Wed Feb 09 14:40:43 +1000 2011
SQL (3.0ms)  SET SQL_AUTO_IS_NULL=0
Processing by Rails::InfoController#properties as 
Rendered inline template (1.0ms)
Completed 200 OK in 269ms (Views: 7.0ms | ActiveRecord: 3.0ms)

浏览到http://localhost:3000/rails/info/properties

代码语言:javascript
复制
Ruby version    1.8.7 (java)
RubyGems version    1.4.2
Rack version    1.2
Rails version   3.0.4
Active Record version   3.0.4
Action Pack version 3.0.4
Active Resource version 3.0.4
Action Mailer version   3.0.4
Active Support version  3.0.4
Middleware  
ActionDispatch::Static
Rack::Lock
ActiveSupport::Cache::Strategy::LocalCache
Rack::Runtime
Rails::Rack::Logger
ActionDispatch::ShowExceptions
ActionDispatch::RemoteIp
Rack::Sendfile
ActionDispatch::Callbacks
ActiveRecord::ConnectionAdapters::ConnectionManagement
ActiveRecord::QueryCache
ActionDispatch::Cookies
ActionDispatch::Session::CookieStore
ActionDispatch::Flash
ActionDispatch::ParamsParser
Rack::MethodOverride
ActionDispatch::Head
ActionDispatch::BestStandardsSupport
Application root    /Users/kim/Projects/TestApp
Environment development
Database adapter    mysql
Database schema version 0

试试千里达:

代码语言:javascript
复制
jruby -S trinidad
Feb 9, 2011 2:42:05 PM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["http-bio-3000"]
Feb 9, 2011 2:42:05 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Feb 9, 2011 2:42:05 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.6
Feb 9, 2011 2:42:05 PM org.apache.catalina.startup.ContextConfig webConfig
INFO: No global web.xml found
Feb 9, 2011 2:42:07 PM org.apache.catalina.core.ApplicationContext log
INFO: Info: using runtime pool timeout of 30 seconds
Feb 9, 2011 2:42:07 PM org.apache.catalina.core.ApplicationContext log
INFO: Info: received min runtimes = 1
Feb 9, 2011 2:42:07 PM org.apache.catalina.core.ApplicationContext log
INFO: Info: received max runtimes = 5
Could not find jdbc-mysql-5.1.13 in any of the sources
Feb 9, 2011 2:42:10 PM org.apache.catalina.core.ApplicationContext log
SEVERE: Error: unable to initialize application
org.jruby.rack.RackInitializationException: exit
from org/jruby/RubyKernel.java:838:in `exit'
from /opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/setup.rb:10:in `(root)'
from org/jruby/RubyKernel.java:1041:in `require'
from /opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/setup.rb:34:in `require'
from /Users/kim/RubymineProjects/TestApp/config/boot.rb:6:in `(root)'
from org/jruby/RubyKernel.java:1041:in `require'
from /Users/kim/RubymineProjects/TestApp/config/boot.rb:165:in `load_environment'
from file:/opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/jruby-rack-1.0.5/lib/jruby-rack-1.0.5.jar!/jruby/rack/rails.rb:173:in `to_app'
from file:/opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/jruby-rack-1.0.5/lib/jruby-rack-1.0.5.jar!/jruby/rack/rails.rb:194:in `new'
from <web.xml>:1:in `(root)'
from org/jruby/RubyObject.java:1204:in `instance_eval'
from file:/opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/jruby-rack-1.0.5/lib/jruby-rack-1.0.5.jar!/vendor/rack-1.2.1/rack/builder.rb:46:in `initialize'
from <web.xml>:1:in `(root)'
at org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:198)
at org.jruby.rack.PoolingRackApplicationFactory$1.run(PoolingRackApplicationFactory.java:160)
at java.lang.Thread.run(Thread.java:680)
Caused by: org.jruby.exceptions.RaiseException: (SystemExit) exit

哇哦。错过jdbc-mysql:

代码语言:javascript
复制
jruby -S gem install jdbc-mysql
Successfully installed jdbc-mysql-5.1.13
1 gem installed

jruby -S trinidad
Feb 9, 2011 2:45:03 PM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["http-bio-3000"]
Feb 9, 2011 2:45:03 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Feb 9, 2011 2:45:03 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.6
Feb 9, 2011 2:45:04 PM org.apache.catalina.startup.ContextConfig webConfig
INFO: No global web.xml found
Feb 9, 2011 2:45:05 PM org.apache.catalina.core.ApplicationContext log
INFO: Info: using runtime pool timeout of 30 seconds
Feb 9, 2011 2:45:05 PM org.apache.catalina.core.ApplicationContext log
INFO: Info: received min runtimes = 1
Feb 9, 2011 2:45:05 PM org.apache.catalina.core.ApplicationContext log
INFO: Info: received max runtimes = 5
Feb 9, 2011 2:45:13 PM org.apache.catalina.core.ApplicationContext log
INFO: Info: add application to the pool. size now = 1
Feb 9, 2011 2:45:13 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["http-bio-3000"]
Feb 9, 2011 2:45:19 PM org.apache.catalina.core.ApplicationContext log
INFO: 

浏览到http://localhost:3000/rails/info/properties,一切正常。

代码语言:javascript
复制
Started GET "/rails/info/properties" for 0:0:0:0:0:0:0:1%0 at Wed Feb 09 14:45:19 +1000 2011
Feb 9, 2011 2:45:19 PM org.apache.catalina.core.ApplicationContext log
INFO:   SQL (4.0ms)  SET SQL_AUTO_IS_NULL=0
Feb 9, 2011 2:45:19 PM org.apache.catalina.core.ApplicationContext log
INFO:   Processing by Rails::InfoController#properties as 
Feb 9, 2011 2:45:20 PM org.apache.catalina.core.ApplicationContext log
INFO: Rendered inline template (2.0ms)
Feb 9, 2011 2:45:20 PM org.apache.catalina.core.ApplicationContext log
INFO: Completed 200 OK in 75ms (Views: 9.0ms | ActiveRecord: 4.0ms)

编辑公共index.html,即可进行更改。

现在试试jetty_rails

代码语言:javascript
复制
jruby -S jetty_rails
/opt/jruby-1.6.0.RC1/lib/ruby/site_ruby/1.8/rubygems.rb:242:in `activate': can't activate activesupport (= 2.3.5, runtime) for [], already activated activesupport-3.0.4 for ["jetty-rails-0.8.1"] (Gem::LoadError)
from /opt/jruby-1.6.0.RC1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:in `require'
from /opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/jetty-rails-0.8.1/lib/jetty_rails.rb:10:in `(root)'
from org/jruby/RubyKernel.java:1041:in `require'
from /opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/jetty-rails-0.8.1/lib/jetty_rails.rb:29:in `require'
from /opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/jetty-rails-0.8.1/bin/jetty_rails:37:in `(root)'
from org/jruby/RubyKernel.java:1066:in `load'

修复方法是编辑/opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/jetty-rails-0.8.1/lib/jetty_rails.rb:

代码语言:javascript
复制
vi /opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/jetty-rails-0.8.1/lib/jetty_rails.rb

更改此设置:

代码语言:javascript
复制
require "java"
require "rubygems"
require "activesupport"
require "jetty_rails/jars"

要这样做:

代码语言:javascript
复制
require "java"
require "rubygems"
#require "activesupport"
require "active_support"
require "active_support/all"
require "jetty_rails/jars"

这应该使用rails版本if/else,但这是一个快速修复方法。

代码语言:javascript
复制
jruby -S jetty_rails
2011-02-09 14:49:45.918::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
Starting server 3000
2011-02-09 14:49:46.131::INFO:  jetty-6.1.14
2011-02-09 14:49:46.833:/:INFO:  Info: using runtime pool timeout of 30 seconds
2011-02-09 14:49:46.834:/:INFO:  Info: received min runtimes = 1
2011-02-09 14:49:46.834:/:INFO:  Info: received max runtimes = 5
2011-02-09 14:49:53.122:/:WARN:  Error: unable to initialize application
org.jruby.rack.RackInitializationException: uninitialized constant Rack::Runtime
from /opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/railties-3.0.4/lib/rails/application.rb:189:in `tap'
from /opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/railties-3.0.4/lib/rails/application.rb:189:in `default_middleware_stack'
from /opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/railties-3.0.4/lib/rails/application.rb:161:in `app'
from /opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/railties-3.0.4/lib/rails/application/finisher.rb:35:in `(class Finisher)'
from /opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/railties-3.0.4/lib/rails/initializable.rb:25:in `instance_exec'
from /opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/railties-3.0.4/lib/rails/initializable.rb:25:in `run'
from /opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/railties-3.0.4/lib/rails/initializable.rb:50:in `run_initializers'
from /opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/railties-3.0.4/lib/rails/initializable.rb:49:in `each'
from /opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/railties-3.0.4/lib/rails/initializable.rb:49:in `run_initializers'
from /opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/railties-3.0.4/lib/rails/application.rb:134:in `initialize!'
from /opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/railties-3.0.4/lib/rails/application.rb:77:in `send'
from /opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/railties-3.0.4/lib/rails/application.rb:77:in `method_missing'
from /Users/kim/RubymineProjects/TestApp/config/environment.rb:5:in `(root)'
from /Users/kim/RubymineProjects/TestApp/config/environment.rb:26:in `load'
from /Users/kim/RubymineProjects/TestApp/config/environment.rb:26:in `load_environment'
from file:/opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/jetty-rails-0.8.1/lib/jruby-rack-0.9.5-SNAPSHOT.jar!/jruby/rack/rails.rb:151:in `new'
from <script>:2:in `(root)'
from file:/opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/jetty-rails-0.8.1/lib/jruby-rack-0.9.5-SNAPSHOT.jar!/rack/builder.rb:29:in `instance_eval'
from file:/opt/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/jetty-rails-0.8.1/lib/jruby-rack-0.9.5-SNAPSHOT.jar!/rack/builder.rb:29:in `initialize'
from <script>:2:in `(root)'
at org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:153)
at org.jruby.rack.PoolingRackApplicationFactory$1.run(PoolingRackApplicationFactory.java:157)
at java.lang.Thread.run(Thread.java:680)
Caused by: org.jruby.exceptions.RaiseException: (NameError) uninitialized constant Rack::Runtime
2011-02-09 14:50:17.048::INFO:  Started SelectChannelConnector@0.0.0.0:3000

老鼠。如此接近..。

EN

回答 1

Stack Overflow用户

发布于 2011-06-03 23:52:17

对你的问题不是一个明确的答案,但你可能想看看在JRuby/JBoss上运行Rails应用的TorqueBox。它很容易启动和运行。

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/4941151

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档