Skip to content

Instantly share code, notes, and snippets.

@futurechimp
Created March 30, 2012 10:20
Show Gist options
  • Save futurechimp/2250617 to your computer and use it in GitHub Desktop.
Save futurechimp/2250617 to your computer and use it in GitHub Desktop.
Padrino 0.10.6 problem on first request in JRuby
# Startup completes successfully. Hitting the first URL, the following error is thrown:
# java package `org.jruby.rack.name.name.name' does not have a method `split'
# this has also happened on javax.security.name.name.name
# Reading the stack trace, we can see that it's somehow related to
https://github.com/padrino/padrino-framework/blob/master/padrino-core/lib/padrino-core/reloader.rb#L106
# The code in question is the "split" method call on the first line of lock!:
def lock!
klasses = ObjectSpace.classes.map { |klass| klass.name.split('::')[0] }.uniq
klasses = klasses | Padrino.mounted_apps.map { |app| app.app_class }
Padrino::Reloader.exclude_constants.concat(klasses)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment