Forum: Rails Engines development testing path problems

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
263b956f8732abf0a129c8b493e2b473?d=identicon&s=25 ben wiseley (Guest)
on 2007-06-06 21:04
(Received via mailing list)
I was converting an existing rails app to an engine... that worked fine
just put everything in an engine (controllers, models, etc.).  All tests
passed if they were in the engine but, for functional tests, outside of
engine, the paths to the engine don't seem to be being found.

If I put this in my environment things work again:
  %W( app/controllers app/helpers app/models app/views lib ).each do |p|
     config.load_paths += %W( #{RAILS_ROOT}/vendor/plugins/nzwe/#{p} )

Any idea what I'm missing here?  Seems like having that in your
isn't a great idea because it seems like the engine plugin does that for
you, except, apparently, when running functional test.

The exact error is:
`load_missing_constant': uninitialized constant ApplicationController

Which I think means it's failing to load some require/includes in

I'm using Engines::Testing.set_fixture_path in the test_helper.rb if

05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 James Adam (Guest)
on 2007-06-06 23:16
(Received via mailing list)
On 6/6/07, ben wiseley <> wrote:
>  The exact error is:
> `load_missing_constant': uninitialized constant ApplicationController
> (NameError)

It sounds like you're trying to load one of your controllers before
Rails is ready.

Are you doing anything with your controllers in your init.rb files?
This topic is locked and can not be replied to.