Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Rails 4.0.0.rc1 fails under warbler with `silence` error #159

Closed
jkutner opened this Issue May 2, 2013 · 2 comments

Comments

Projects
None yet
1 participant
Member

jkutner commented May 2, 2013

When attempting to run a Rails 4.0.0.rc1 app with warbler, the following error is generated:

May 01, 2013 10:47:45 PM winstone.Logger logInternal
INFO: 
ArgumentError (wrong number of arguments calling `capture` (0 for 1)):
  activerecord (4.0.0.rc1) lib/active_record/migration.rb:363:in `call'
  actionpack (4.0.0.rc1) lib/action_dispatch/middleware/callbacks.rb:29:in `call'
  activesupport (4.0.0.rc1) lib/active_support/callbacks.rb:395:in `_run__1708747035__call__callbacks'
  org/jruby/RubyBasicObject.java:1677:in `__send__'
  org/jruby/RubyKernel.java:2103:in `send'
  activesupport (4.0.0.rc1) lib/active_support/callbacks.rb:80:in `run_callbacks'
  actionpack (4.0.0.rc1) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (4.0.0.rc1) lib/action_dispatch/middleware/reloader.rb:64:in `call'
  actionpack (4.0.0.rc1) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
  actionpack (4.0.0.rc1) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
  actionpack (4.0.0.rc1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.0.0.rc1) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.0.0.rc1) lib/rails/rack/logger.rb:21:in `call'
  activesupport (4.0.0.rc1) lib/active_support/tagged_logging.rb:67:in `tagged'
  activesupport (4.0.0.rc1) lib/active_support/tagged_logging.rb:25:in `tagged'
  activesupport (4.0.0.rc1) lib/active_support/tagged_logging.rb:67:in `tagged'
  railties (4.0.0.rc1) lib/rails/rack/logger.rb:21:in `call'
  actionpack (4.0.0.rc1) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
  rack (1.5.2) lib/rack/runtime.rb:17:in `call'
  activesupport (4.0.0.rc1) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
  rack (1.5.2) lib/rack/lock.rb:17:in `call'
  actionpack (4.0.0.rc1) lib/action_dispatch/middleware/static.rb:64:in `call'
  railties (4.0.0.rc1) lib/rails/engine.rb:511:in `call'
  railties (4.0.0.rc1) lib/rails/application.rb:96:in `call'
  file:lib/jruby-rack-1.1.13.2.jar!/rack/handler/servlet.rb:22:in `call'

The Kernel.capture method is actually being called by it's alias, silence. But the method that is intended to be called is LoggerSilence.silence(arg1), which is defined in activesupport/lib/active_support/logger_silence.rb.

Adding a check if defined?(LoggerSilence) before the call to silence finds that the module is in fact loaded. So this may be a JRuby bug of some kind.

This can be reproduced with the following:

$ git clone git@bitbucket.org:codefinger/warbler-examples.git
$ cd warbler-examples/rails4_app
$ bundle install
$ warble executable war
$ java -jar rails4_app.war

Then browse to localhost:8080/posts

Member

jkutner commented May 11, 2013

Apparently, this had something to do with how my config/environments/production.rb was configured. It does not appear to be a normal case.

@jkutner jkutner closed this May 11, 2013

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