rails.nerd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2010-Mar-24 02:34 UTC
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 :( uninitialized constant Rack::FirebugLogger (NameError) Any clues? thanks! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
rails.nerd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2010-Mar-25 04:08 UTC
Re: files in lib directory not loading
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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
rails.nerd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2010-Mar-26 04:56 UTC
Re: files in lib directory not loading
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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 rails.nerd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 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-- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.