开发者

jRuby/Glassfish won't recognize installed gems (Rails Application)

When I try to launch my Rails application using jRuby, it says I need to install rails 2.3.8 which is already installed. These are the commands I used and their errors:

Attempt to Launch Application:

[root@node app]# /opt/jruby-1.5.2/bin/jruby -S /opt/jruby-1.5.2/bin/glassfish -p 3001

Starting GlassFish server at: 0.0.0.0:3001 in development environment...

Writing log messages to: /opt/app/log/development.log.

Press Ctrl+C to stop.

Missing the Rails 2.3.8 gem. Please gem install -v=2.3.8 rails, update your RAILS_GEM_VERSI开发者_Go百科ON setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.

Local Gems:

[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)  

Other Relevant Info:

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/  


I had the exact same problem and finally solved it by uninstalling a version of Rack, so that there's only one Rack version left.

I would actually still like to know how on earth that could cause this error.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜