Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

ShowExceptions fails to find layout due to bundler

#3420

ActionDispatch::ShowExceptions fails to find the templates for rescuing in public when using Bundler to bundle all your gems.

The reason for this is that ActionDispatch::ShowExceptions::RESCUES_TEMPLATE_PATH is being set to File.join(File.dirname(__FILE__), 'templates') which resolves to RAILS_ROOT/vendor/gems/gems/actionpack/lib/action_dispatch/middleware/templates

Notice that "actionpack" is missing the version 3.0.pre which is part of the path. The correct path should be: RAILS_ROOT/vendor/gems/gems/actionpack-3.0.pre/lib/action_dispatch/middleware/templates

Anyone else having the same issue?

Reported by Rick Martinez · October 24th, 2009 @ 10:55 PM

State: stale
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Rick Martinez
    Rick Martinez

    I've found why it's getting that path, it's ActionMailer not being happy with the bundled gem arrangement somehow. Here's the unresolved path:

    /Users/rick/Sites/fiusm2/vendor/gems/gems/actionmailer-3.0.pre/lib/../../actionpack/lib/action_dispatch/middleware/show_exceptions.rb

    Looks like there's a dependency it shouldn't be loading itself. When I turn off the framework, it works just fine.

    October 25th, 2009 @ 09:42 AM

  2. Rick Martinez
    Rick Martinez

    The problem comes and goes when I run gem bundle. It looks like it has something to do with the order of the gems in the vendor/gems/environment.rb file. I think it's a bug with ActionMailer itself though, instead of anything having to do with bundler.

    October 25th, 2009 @ 04:23 PM

  3. Rohit Arondekar
    Rohit Arondekar
    • State changed from new to stale
    • Importance changed from to

    Marking ticket as stale. If this is still an issue please leave a comment with suggested changes, creating a patch with tests, rebasing an existing patch or just confirming the issue on a latest release or master/branches.

    October 6th, 2010 @ 06:37 AM