Only prepend LIBDIR to the load path if it's truly missing #26

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

Forcing LIBDIR to be the first item on the load path means that if passenger has been installed as a package in the main ruby library directory then the rack (if any) in that directory will always be used regardless of what the Gemfile may ask for.

With this patch LIBDIR is only prepended to the load path if it is not present anywhere on the existing path, rather than if it isn't the first thing on the path. This allows any rack gem added to the path by bundler to take precedence over one in LIBDIR.

@tomhughes tomhughes Only prepend LIBDIR to the load path if it's truly missing
Forcing LIBDIR to be the first item on the load path means that if
passenger has been installed as a package in the main ruby library
directory then the rack (if any) in that directory will always be
used regardless of what the Gemfile may ask for.
10f1d7a
Owner

FooBarWidget commented Oct 13, 2011

The downside of this patch is that if the user erroneously specified a different version of Phusion Passenger in his Gemfile, then that would still mess things up. But I guess the user just shouldn't do that.

Owner

FooBarWidget commented Oct 13, 2011

I've committed a slightly different version. Thanks for reporting the issue.

Thanks, without this it's impossible to run any app needing rack > 1.1.0 with the Ubuntu passenger packages from the Brightbox repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment