jRuby / Glassfish无法识别已安装的宝石(Rails应用程序)

时间:2010-12-30 23:21:28

标签: ruby-on-rails ruby jruby jrubyonrails

当我尝试使用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/  

1 个答案:

答案 0 :(得分:1)

我遇到了完全相同的问题,最后通过卸载Rack版本解决了这个问题,因此只剩下一个Rack版本。

我实际上仍然想知道如何导致此错误。