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

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