So the rails upgrade resolved my orginal problem. But now I see the error the original poster described.
I turned on verbose logging for class loading and indeed the RubySocket class is being loaded twice during the app server startup:
# grep RubySocket glassfishv3/glassfish/domains/mediacast/logs/jvm.log
[Loaded org.jruby.ext.socket.RubySocket$Service from file:/app/mediacast/jruby-1.4.0/lib/jruby.jar]
[Loaded org.jruby.ext.socket.RubySocket from file:/app/mediacast/jruby-1.4.0/lib/jruby.jar]
[Loaded org.jruby.ext.socket.RubySocket from file:/app/mediacast/jruby-1.4.0/lib/jruby.jar]
I can reproduce the issue with JRuby 1.20, 1.3.1 and 1.4.0, rails 2.3.5, rack 1.0.1, SGES v3, jdk 6u18, OpenSolaris 2009.06.
Please note that I'm using SGES v3 distro and not the community gf v3 distro. I don't know if it makes a difference, but the same app deploys just fine on gf v3 on my laptop, I wonder if there is a significant difference between the two distributions. I'm gonna try installing gf v3 on my server.
This is my stack trace:
/app/mediacast/mediacast-2.3.2/config/../vendor/rails/railties/lib/initializer.rb:271:in `require_frameworks': library `socket' could
not be loaded: java.lang.LinkageError: loader (instance of java/net/URLClassLoader): attempted duplicate class definition for name:
"org/jruby/ext/socket/RubySocket" (RuntimeError)
from /app/mediacast/mediacast-2.3.2/config/../vendor/rails/railties/lib/initializer.rb:134:in `process'
from /app/mediacast/mediacast-2.3.2/config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
from /app/mediacast/mediacast-2.3.2/config/environment.rb:22
from /app/mediacast/mediacast-2.3.2/config/environment.rb:31:in `require'
from /app/mediacast/jruby-1.3.1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from file:/app/mediacast/glassfishv3/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:98:in `load_application' from file:/app/mediacast/glassfishv3/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:75:in `initialize'
from file:/app/mediacast/glassfishv3/glassfish/modules/grizzly-jruby.jar!/jruby/rack/rails.rb:25:in `new'
from <script>:1
...internal jruby stack elided...
from Rails::Initializer.require_frameworks(/app/mediacast/mediacast-2.3.2/config/../vendor/rails/railties/lib/initializer.rb:1
34)
from Rails::Initializer.process(/app/mediacast/mediacast-2.3.2/config/../vendor/rails/railties/lib/initializer.rb:113) from #<Class:01xcbd22a>.run(/app/mediacast/mediacast-2.3.2/config/environment.rb:22)
from (unknown).(unknown)(/app/mediacast/mediacast-2.3.2/config/environment.rb:31) from Kernel.require(/app/mediacast/jruby-1.3.1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31)
from Kernel.require(file:/app/mediacast/glassfishv3/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:98)
from Rack::Adapter::Rails.load_application(file:/app/mediacast/glassfishv3/glassfish/modules/grizzly-jruby.jar!/rack/adapter/r
ails.rb:75)
from Rack::Adapter::Rails.initialize(file:/app/mediacast/glassfishv3/glassfish/modules/grizzly-jruby.jar!/jruby/rack/rails.rb:
25) from #<Class:01xcc357d>.new(<script>:1)
from (unknown).(unknown)(:1)
|#]
[Message sent by forum member 'iminar' (iiminar_at_gmail.com)]
http://forums.java.net/jive/thread.jspa?messageID=381299