Skip to content

Instantly share code, notes, and snippets.

@dobbs
Created January 30, 2012 00:00
Show Gist options
  • Save dobbs/1701456 to your computer and use it in GitHub Desktop.
Save dobbs/1701456 to your computer and use it in GitHub Desktop.
to_yaml missing on first hit: rails3.2.1 jboss7.1CR1b jruby1.6.6 warbler1.3.2
16:46:10,511 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/service_request]] (http--10.200.81.210-8080-1) Warning: no min runtimes specified.
16:46:10,514 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/service_request]] (http--10.200.81.210-8080-1) Warning: no max runtimes specified.
16:46:10,519 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/service_request]] (http--10.200.81.210-8080-1) An exception happened during JRuby-Rack startup
method 'to_yaml' not defined in Object
--- System
jruby 1.6.5.1 (ruby-1.9.2-p136) (2011-12-27 1bf37c2) (Java HotSpot(TM) 64-Bit Server VM 1.7.0_02) [linux-amd64-java]
Time: 2012-01-29 16:46:10 -0700
Server: JBoss Web/7.0.7.Final
jruby.home: classpath:/META-INF/jruby.home
--- Context Init Parameters:
jruby.compat.version = 1.9
public.root = /
rails.env = development
--- Backtrace
NameError: method 'to_yaml' not defined in Object
remove_method at org/jruby/RubyModule.java:2281
(eval) at classpath:/META-INF/jruby.home/lib/ruby/1.9/yaml.rb:26
module_eval at org/jruby/RubyModule.java:2254
yamler= at classpath:/META-INF/jruby.home/lib/ruby/1.9/yaml.rb:22
(root) at classpath:/META-INF/jruby.home/lib/ruby/1.9/yaml.rb:44
require at org/jruby/RubyKernel.java:1047
require at classpath:/META-INF/jruby.home/lib/ruby/1.9/yaml.rb:36
load_yaml at classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems.rb:650
load_file at classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:235
initialize at classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:178
configuration at classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems.rb:361
configuration at /usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/rubygems_integration.rb:25
initialize at /usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/rubygems_integration.rb:5
Bundler at /usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/rubygems_integration.rb:335
(root) at /usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/rubygems_integration.rb:1
require at org/jruby/RubyKernel.java:1047
require at /usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/rubygems_integration.rb:36
(root) at /usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/shared_helpers.rb:4
require at org/jruby/RubyKernel.java:1047
require at /usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/shared_helpers.rb:36
(root) at /usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/setup.rb:1
require at org/jruby/RubyKernel.java:1047
require at /usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/setup.rb:59
(root) at /usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/config/boot.rb:6
require at org/jruby/RubyKernel.java:1047
require at /usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/config/boot.rb:36
load_environment at classpath:/jruby/rack/rails.rb:165
to_app at classpath:/jruby/rack/rails.rb:173
new at classpath:/jruby/rack/rails.rb:193
(root) at <web.xml>:1
instance_eval at org/jruby/RubyBasicObject.java:1720
initialize at classpath:/vendor/rack-1.3.2/rack/builder.rb:51
(root) at <web.xml>:1
--- RubyGems
Gem.dir: /usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems
Gem.path:
/usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems
Activated gems:
bundler-1.0.21
--- Bundler
undefined method `bundle_path' for Bundler:Module
--- JRuby-Rack Config
background_spooling = false
compat_version = RUBY1_9
filter_adds_html = true
filter_verifies_resource = false
ignore_environment = false
initial_runtimes =
jms_connection_factory =
jms_jndi_properties =
logger = org.jruby.rack.logging.ServletContextLogger@5ed05c58
logger_class_name = servlet_context
logger_name = jruby.rack
maximum_runtimes =
memory_buffer_size = 65536
num_initializer_threads =
rackup =
rackup_path =
rewindable = true
runtime_timeout_seconds =
serial_initialization = false
servlet_context = org.apache.catalina.core.ApplicationContextFacade@2f1c5a78
16:46:10,523 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/service_request]] (http--10.200.81.210-8080-1) Application Error: org.jruby.rack.RackInitializationException: method 'to_yaml' not defined in Object
from classpath:/META-INF/jruby.home/lib/ruby/1.9/yaml.rb:26:in `(eval)'
from org/jruby/RubyModule.java:2254:in `module_eval'
from classpath:/META-INF/jruby.home/lib/ruby/1.9/yaml.rb:22:in `yamler='
from classpath:/META-INF/jruby.home/lib/ruby/1.9/yaml.rb:44:in `(root)'
from org/jruby/RubyKernel.java:1047:in `require'
from classpath:/META-INF/jruby.home/lib/ruby/1.9/yaml.rb:36:in `require'
from classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems.rb:650:in `load_yaml'
from classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:235:in `load_file'
from classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:178:in `initialize'
from classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems.rb:361:in `configuration'
from /usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/rubygems_integration.rb:25:in `configuration'
from /usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/rubygems_integration.rb:5:in `initialize'
from /usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/rubygems_integration.rb:335:in `Bundler'
from /usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/rubygems_integration.rb:1:in `(root)'
from org/jruby/RubyKernel.java:1047:in `require'
from /usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/rubygems_integration.rb:36:in `require'
from /usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/shared_helpers.rb:4:in `(root)'
from org/jruby/RubyKernel.java:1047:in `require'
from /usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/shared_helpers.rb:36:in `require'
from /usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/setup.rb:1:in `(root)'
from org/jruby/RubyKernel.java:1047:in `require'
from /usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/setup.rb:59:in `require'
from /usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/config/boot.rb:6:in `(root)'
from org/jruby/RubyKernel.java:1047:in `require'
from /usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/config/boot.rb:36:in `require'
from classpath:/jruby/rack/rails.rb:165:in `load_environment'
from classpath:/jruby/rack/rails.rb:173:in `to_app'
from classpath:/jruby/rack/rails.rb:193:in `new'
from <web.xml>:1:in `(root)'
from org/jruby/RubyBasicObject.java:1720:in `instance_eval'
from classpath:/vendor/rack-1.3.2/rack/builder.rb:51:in `initialize'
from <web.xml>:1:in `(root)'
at org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:204) [jruby-rack-1.0.10.jar:]
at org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:54) [jruby-rack-1.0.10.jar:]
at org.jruby.rack.PoolingRackApplicationFactory.getApplication(PoolingRackApplicationFactory.java:95) [jruby-rack-1.0.10.jar:]
at org.jruby.rack.DefaultRackDispatcher.process(DefaultRackDispatcher.java:28) [jruby-rack-1.0.10.jar:]
at org.jruby.rack.RackFilter.doFilter(RackFilter.java:58) [jruby-rack-1.0.10.jar:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.7.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.7.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.7.Final.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.7.Final.jar:]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:151) [jboss-as-web-7.1.0.CR1b.jar:7.1.0.CR1b]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.7.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.7.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.7.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.7.Final.jar:]
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:897) [jbossweb-7.0.7.Final.jar:]
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:626) [jbossweb-7.0.7.Final.jar:]
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2033) [jbossweb-7.0.7.Final.jar:]
at java.lang.Thread.run(Thread.java:722) [:1.7.0_02]
Caused by: org.jruby.exceptions.RaiseException: (NameError) method 'to_yaml' not defined in Object
at org.jruby.RubyModule.remove_method(org/jruby/RubyModule.java:2281) [jruby-core-1.6.5.1.jar:]
at #<Class:0x1ab8ea0c>.(eval)(classpath:/META-INF/jruby.home/lib/ruby/1.9/yaml.rb:26) at org.jruby.RubyModule.module_eval(org/jruby/RubyModule.java:2254) [jruby-core-1.6.5.1.jar:]
at YAML::EngineManager.yamler=(classpath:/META-INF/jruby.home/lib/ruby/1.9/yaml.rb:22) at #<Class:0x3fe7c1a4>.(root)(classpath:/META-INF/jruby.home/lib/ruby/1.9/yaml.rb:44) at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1047) [jruby-core-1.6.5.1.jar:]
at Kernel.require(classpath:/META-INF/jruby.home/lib/ruby/1.9/yaml.rb:36) at #<Class:0x70a5d627>.load_yaml(classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems.rb:650) at Gem::ConfigFile.load_file(classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:235) at Gem::ConfigFile.initialize(classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:178) at #<Class:0x70a5d627>.configuration(classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems.rb:361) at Bundler::RubygemsIntegration.configuration(/usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/rubygems_integration.rb:25) at Bundler::RubygemsIntegration.initialize(/usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/rubygems_integration.rb:5) at Module.Bundler(/usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/rubygems_integration.rb:335) at #<Class:0x3fe7c1a4>.(root)(/usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/rubygems_integration.rb:1) at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1047) [jruby-core-1.6.5.1.jar:]
at Kernel.require(/usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/rubygems_integration.rb:36) at #<Class:0x3fe7c1a4>.(root)(/usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/shared_helpers.rb:4) at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1047) [jruby-core-1.6.5.1.jar:]
at Kernel.require(/usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/shared_helpers.rb:36) at #<Class:0x3fe7c1a4>.(root)(/usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/setup.rb:1) at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1047) [jruby-core-1.6.5.1.jar:]
at Kernel.require(/usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/gems/gems/bundler-1.0.21/lib/bundler/setup.rb:59) at #<Class:0x3fe7c1a4>.(root)(/usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/config/boot.rb:6) at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1047) [jruby-core-1.6.5.1.jar:]
at Kernel.require(/usr/local/jboss/7.1/standalone/tmp/vfs/tempbe416b72fbc0206b/content-5ee90bf3fcac5951/WEB-INF/config/boot.rb:36) at JRuby::Rack::RailsBooter::Rails3Environment.load_environment(classpath:/jruby/rack/rails.rb:165) at JRuby::Rack::RailsBooter::Rails3Environment.to_app(classpath:/jruby/rack/rails.rb:173) at #<Class:0x522aa40a>.new(classpath:/jruby/rack/rails.rb:193) at #<Class:0x1df2591>.(root)(<web.xml>:1) at org.jruby.RubyBasicObject.instance_eval(org/jruby/RubyBasicObject.java:1720) [jruby-core-1.6.5.1.jar:]
at Rack::Builder.initialize(classpath:/vendor/rack-1.3.2/rack/builder.rb:51) at #<Class:0x3fe7c1a4>.(root)(<web.xml>:1)
16:46:10,639 INFO [org.jboss.as.osgi] (MSC service thread 1-2) JBAS011921: Stopping OSGi Framework
@dobbs
Copy link
Author

dobbs commented Jan 30, 2012

Would love suggestions for most fruitful path to debug this in a hurry:

  • isolate my code... deploy a vanila rails app? (probably need a controller and a view)
  • isolate JRuby... try again with jruby-head instead of 1.6.5.1
  • isolate Warbler... try again with warbler-head?
  • isolate JBoss... maybe try a different release or try Torquebox

@dobbs
Copy link
Author

dobbs commented Jan 30, 2012

I get the same symptoms using Java 6 and a vanilla rail3.1 app. The JBoss error log is identical (except for things like java6 paths instead of java7 and different tmp directories).

@BanzaiMan
Copy link

I suspect this is http://bugs.jruby.org/6384. Please try the newly released 1.6.6.

@dobbs
Copy link
Author

dobbs commented Jan 30, 2012

I got JBoss7.1 here in case that version matters.
http://download.jboss.org/jbossas/7.1/jboss-as-7.1.0.CR1b/jboss-as-7.1.0.CR1b.tar.gz

I did see these same symptoms with JBoss7.0, so I don't think it's JBoss.

These most recent versions of the server.log and my command history are for a freshly generated rails 3.2.1 app.

@dobbs
Copy link
Author

dobbs commented Jan 31, 2012

Here's a link to a previous revision of this gist which shows the same symptoms for jruby 1.6.5.1
https://gist.github.com/1701456/507622769a90ea1cf5b6bd8b70c256e224250ef2

@headius
Copy link

headius commented Jan 31, 2012

Filed JRuby bug (http://jira.codehaus.org/browse/JRUBY-6397) but it appears to be a JRuby-rack issue (jruby/jruby-rack#89).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment