bj icon indicating copy to clipboard operation
bj copied to clipboard

uninitialized constant Logger

Open cheeby opened this issue 12 years ago • 3 comments

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:ingem_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:inload' 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

cheeby avatar May 06 '12 22:05 cheeby

same issue here...

foxxx avatar Aug 28 '12 06:08 foxxx

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:ingem_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:inload' from /usr/bin/bj:23

taryneast avatar Oct 15 '12 03:10 taryneast

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

taryneast avatar Oct 17 '12 23:10 taryneast