当我尝试使用 jRuby 启动我的 Rails 应用程序时,它说我需要安装已经安装的 rails 2.3.8。这些是我使用的命令及其错误:
尝试启动应用程序:
[root@node app]# /opt/jruby-1.5.2/bin/jruby -S /opt/jruby-1.5.2/bin/glassfish -p 3001
在开发环境中启动 GlassFish 服务器:0.0.0.0:3001。 ..
将日志消息写入:/opt/app/log/development.log。
按 Ctrl+C 停止。缺少 Rails 2.3.8 gem。请
gem install -v=2.3.8 rails
为您已安装的 Rails 版本更新 config/environment.rb 中的 RAILS_GEM_VERSION 设置,或注释掉 RAILS_GEM_VERSION 以使用已安装的最新版本。
本地宝石:
[root@node app]# /opt/jruby-1.5.2/bin/jruby -S gem list
*** LOCAL GEMS ***
abstract (1.0.0)
actionmailer (3.0.3, 3.0.1, 2.3.8)
actionpack (3.0.3, 3.0.1, 2.3.8)
activemodel (3.0.3, 3.0.1)
activerecord (3.0.3, 3.0.1, 2.3.8)
activerecord-jdbc-adapter (1.0.2, 0.9.7)
activerecord-jdbcmysql-adapter (1.0.2, 0.9.7)
activeresource (3.0.3, 3.0.1, 2.3.8)
activesupport (3.0.3, 3.0.1, 2.3.8)
arel (2.0.6, 1.0.1)
bouncy-castle-java (1.5.0145.2)
builder (2.1.2)
bundler (1.0.3)
columnize (0.3.1)
dbi (0.4.5)
deprecated (3.0.0, 2.0.1)
diff-lcs (1.1.2)
erubis (2.6.6)
glassfish (1.0.2)
i18n (0.4.1)
jdbc-mysql (5.0.4)
jruby-openssl (0.7.1)
json (1.4.6)
mail (2.2.12, 2.2.7)
mime-types (1.16)
polyglot (0.3.1)
rack (1.2.1, 1.1.0)
rack-mount (0.6.13)
rack-test (0.5.6)
rails (3.0.3, 3.0.1, 2.3.8)
railties (3.0.3, 3.0.1)
rake (0.8.7)
rspec (2.0.1, 1.3.0)
rspec-core (2.0.1)
rspec-expectations (2.0.1)
rspec-mocks (2.0.1)
ruby-debug (0.10.3)
ruby-debug-base (0.10.3.2)
sources (0.0.1)
thor (0.14.6, 0.14.3)
treetop (1.4.8)
tzinfo (0.3.23)
其他相关信息:
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.6
- RUBY VERSION: 1.8.7 (2010-08-20 patchlevel 249) [java]
- INSTALLATION DIRECTORY: /opt/jruby-1.5.2/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /opt/jruby-1.5.2/bin/jruby
- EXECUTABLE DIRECTORY: /opt/jruby-1.5.2/bin
- RUBYGEMS PLATFORMS:
- ruby
- universal-java-1.6
- GEM PATHS:
- /opt/jruby-1.5.2/lib/ruby/gems/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- "install" => "--env-shebang"
- "update" => "--env-shebang"
- REMOTE SOURCES:
- http://rubygems.org/