Files in lib directory not loading

Hi there

I’m trying to install this rack application:
http://fuelyourcoding.com/set-rails-logging-on-fire/

However, my rails3 setup is not picking up my lib file:

app/lib/rack/firebug_logger.rb

which contains:

module Rack
class FirebugLogger

end
end

And in my config/environments/development.rb :

App::Application.configure do

config.middleware.use Rack::FirebugLogger
end

But rails3 is not finding my lib file :frowning:

uninitialized constant Rack::FirebugLogger (NameError)

Any clues?

thanks!

Is “app/lib/rack/firebug_logger.rb” simply the wrong direcotry?

Or is there something I need to do to make it work?

If I put…

module Rack
class FirebugLogger

end
end

… inside my application controller it all works fine –
Rack::FirebugLogger is accessible and works.

thanks for any advice

Does anyone have any clues of suggestions?

I’m not even sure how to manually load Rack::Firebugger in “app/lib/
rack/firebug_logger.rb”

But would rather it just automatically loaded

There is a typo on the blog post you referred to. It should go in lib/
not app/lib.

Also from the same post:
“Rails autoloads (and namespaces) any code placed in the lib directory,
so that is where we’ll place our FirebugLogger code.”

–Daniel

[email protected] wrote:

Does anyone have any clues of suggestions?

I’m not even sure how to manually load Rack::Firebugger in “app/lib/
rack/firebug_logger.rb”

But would rather it just automatically loaded

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs