bj
bj copied to clipboard
uninitialized constant Logger
Hi,
When starting bj I get:
$> bj run --forever --rails_env=production --rails_root=/path/to/app
/usr/local/lib/ruby/gems/1.8/gems/bj-1.0.1/lib/bj/logger.rb:2: uninitialized constant Logger (NameError)
from /usr/local/lib/ruby/gems/1.8/gems/bj-1.0.1/lib/bj.rb:64:in load' from /usr/local/lib/ruby/gems/1.8/gems/bj-1.0.1/lib/bj.rb:64 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in require' from /usr/local/lib/ruby/gems/1.8/gems/bj-1.0.1/bin/bj:3 from /usr/local/bin/bj:19:in
load'
from /usr/local/bin/bj:19
Look familiar? This is ruby 1.8.7 running a rails 2.0.2 app. (I'm in the process of upgrading, but need to get this working on the current production site.)
Thanks,
Steve
same issue here...
Same here, for ruby 1.8.7 and Rails 2.3.2
/usr/lib/ruby/gems/1.8/gems/bj-1.0.1/lib/bj/logger.rb:2: uninitialized constant Logger (NameError)
from /usr/lib/ruby/gems/1.8/gems/bj-1.0.1/lib/bj.rb:64:in load' from /usr/lib/ruby/gems/1.8/gems/bj-1.0.1/lib/bj.rb:64 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:55:in
gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:55:in require' from /usr/lib/ruby/gems/1.8/gems/bj-1.0.1/bin/bj:3 from /usr/bin/bj:23:in
load'
from /usr/bin/bj:23
Ok, I've solved it by hacking /usr/lib/ruby/gems/1.8/gems/bj-1.0.1/lib/bj/logger.rb and adding "require 'logger'" at the top
Idea stolen from here: https://github.com/lsegal/yard/issues/22