szimek
2010-Feb-15 18:50 UTC
Rails 3: Can Bundle.require be called after Application class is defined?
Hi, I''m trying to use shoulda in Rails 3 and there''s a small problem. I''m using branch "rails3" from shoulda repository - http://github.com/thoughtbot/shoulda/tree/rails3. The problem is that shoulda tries to auto load some files from predefined paths and uses Rails.root to build these paths, however, at the moment that shoulda is required Rails.root is nil. In generated application.rb "Bundle.require" is called first and then Application class is defined, which in turn initializes some stuff like i.e. Rails.root. Is there any reason why "Bundle.require" can''t be called after defining Application class? It solves my problem with shoulda. Cheers, Szymek -- 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.