Forum: Ruby on Rails Forcing use of gem in vendor/gems?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2a39aed820c125e6db9826fa8180043f?d=identicon&s=25 Denis Haskin (dwhsix)
on 2009-06-01 23:57
(Received via mailing list)
Sorta surprised this isn't a FAQ, but...

Maybe this is not good practice, but I have a gem that is both installed
in the system and in vendor/gems.  The vendor/gems copy has some local
mods.  Seems like the only way I could find to forced that one to be
loaded for capistrano over the system one was to put:

$LOAD_PATH.insert 0,
"#{File.dirname(__FILE__)}/../vendor/gems/myfavoritegem/lib"

in deploy.rb.

Is that really the best way to do it?  I guess I was sort of figuring
that vendor/gems would be preferred over the system gem library, in the
case of duplicates.

Thanks,

dwh
This topic is locked and can not be replied to.