Open davetron5000 opened 11 years ago
I have the similar issue
$ mongo_browser
/home/lucassus/.rvm/gems/ruby-1.9.3-p194-perf/gems/methadone-1.2.2/lib/methadone/cli_logger.rb:53:in `block in proxy_method': undefined method `formatter=' for nil:NilClass (NoMethodError)
from /home/lucassus/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/core_ext/logger.rb:73:in `initialize'
from /home/lucassus/.rvm/gems/ruby-1.9.3-p194-perf/gems/methadone-1.2.2/lib/methadone/cli_logger.rb:85:in `initialize'
from /home/lucassus/.rvm/gems/ruby-1.9.3-p194-perf/gems/methadone-1.2.2/lib/methadone/cli_logging.rb:37:in `new'
from /home/lucassus/.rvm/gems/ruby-1.9.3-p194-perf/gems/methadone-1.2.2/lib/methadone/cli_logging.rb:37:in `logger'
from /home/lucassus/.rvm/gems/ruby-1.9.3-p194-perf/gems/methadone-1.2.2/lib/methadone/main.rb:376:in `rescue in call_main'
from /home/lucassus/.rvm/gems/ruby-1.9.3-p194-perf/gems/methadone-1.2.2/lib/methadone/main.rb:366:in `call_main'
from /home/lucassus/.rvm/gems/ruby-1.9.3-p194-perf/gems/methadone-1.2.2/lib/methadone/main.rb:165:in `go!'
from /home/lucassus/.rvm/gems/ruby-1.9.3-p194-perf/gems/mongo_browser-0.2.0.rc1/bin/mongo_browser:52:in `<class:App>'
from /home/lucassus/.rvm/gems/ruby-1.9.3-p194-perf/gems/mongo_browser-0.2.0.rc1/bin/mongo_browser:8:in `<top (required)>'
from /home/lucassus/.rvm/gems/ruby-1.9.3-p194-perf/bin/mongo_browser:19:in `load'
from /home/lucassus/.rvm/gems/ruby-1.9.3-p194-perf/bin/mongo_browser:19:in `<main>'
from /home/lucassus/.rvm/gems/ruby-1.9.3-p194-perf/bin/ruby_noexec_wrapper:14:in `eval'
from /home/lucassus/.rvm/gems/ruby-1.9.3-p194-perf/bin/ruby_noexec_wrapper:14:in `<main>'
How to workaround this problem?
The solution is to call change_logger
in your main
method to assign it to a better logger. I suppose it would be better if methadone just used the rails logger without incident, and I'll leave this open as a todo for that