Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #10051 (closed defect: invalid)

Opened 2 years ago

Last modified 2 years ago

RUBY_PLATFORM check in Configuration#set_root_path! fails with Rails 1.2.5 and JRuby on Windows

Reported by: jkraemer Assigned to: core
Priority: normal Milestone: 1.2.6
Component: Railties Version:
Severity: normal Keywords:
Cc: jk@jkraemer.net, nicksieger

Description

here's the stack trace I got when deploying a Rails 1.2.5 app to JBoss on Windows:

17:30:47,375 INFO  Failed to load Rails: No such file or directory - C:/Java/jboss-4.2.1.GA/bin/C:
file:/C:/Java/jboss-4.2.1.GA/server/default/tmp/deploy/tmp40392ecard-server-exp.war/WEB-INF/lib/jruby-complete-1.0.1.jar!/pathname.rb:420:in `realpath_rec'
file:/C:/Java/jboss-4.2.1.GA/server/default/tmp/deploy/tmp40392ecard-server-exp.war/WEB-INF/lib/jruby-complete-1.0.1.jar!/pathname.rb:453:in `realpath'
C:/Java/jboss-4.2.1.GA/server/default/./tmp/deploy/tmp40392ecard-server-exp.war/WEB-INF/config/../vendor/rails/railties/lib/initializer.rb:543:in `set_root_path!'
C:/Java/jboss-4.2.1.GA/server/default/./tmp/deploy/tmp40392ecard-server-exp.war/WEB-INF/config/../vendor/rails/railties/lib/initializer.rb:509:in `initialize'
C:/Java/jboss-4.2.1.GA/server/default/./tmp/deploy/tmp40392ecard-server-exp.war/WEB-INF/config/boot.rb:38:in `new'
C:/Java/jboss-4.2.1.GA/server/default/./tmp/deploy/tmp40392ecard-server-exp.war/WEB-INF/config/boot.rb:38:in `run'
C:/Java/jboss-4.2.1.GA/server/default/./tmp/deploy/tmp40392ecard-server-exp.war/WEB-INF/config/boot.rb:38
file:/C:/Java/jboss-4.2.1.GA/server/default/tmp/deploy/tmp40392ecard-server-exp.war/WEB-INF/lib/jruby-complete-1.0.1.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
file:/C:/Java/jboss-4.2.1.GA/server/default/tmp/deploy/tmp40392ecard-server-exp.war/WEB-INF/lib/jruby-complete-1.0.1.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
C:/Java/jboss-4.2.1.GA/server/default/./tmp/deploy/tmp40392ecard-server-exp.war/WEB-INF/config/environment.rb:11

This does not happen with 1.2.3, and adding 'java' to the regexp on line 538 in initializer.rb fixed the problem for me, however I think this isn't ok for non-windows JRuby deployments.

Change History

11/02/07 19:52:00 changed by nicksieger

The newly-released JRuby 1.0.2 will fix this issue. The corresponding JRuby issue is http://jira.codehaus.org/browse/JRUBY-1401. I don't think this needs to be fixed in Rails.

11/02/07 20:19:57 changed by nicksieger

  • cc changed from jk@jkraemer.net to jk@jkraemer.net, nicksieger.

11/02/07 22:27:07 changed by bitsweat

  • status changed from new to closed.
  • resolution set to invalid.