Claus Spitzer
2/3/2005 8:35:00 PM
Awesome! Thanks to both you and Zach.
On Wed, 2 Feb 2005 02:20:48 +0900, Robert Klemme <bob.news@gmx.net> wrote:
>
> "Claus Spitzer" <docboobenstein@gmail.com> schrieb im Newsbeitrag
> news:bb13341905020109007036e0d3@mail.gmail.com...
> > Greetings fellow rubyists!
> > I am looking for a way of checking which location a library I use is
> > at. Let me demonstrate with an example:
> >
> > Let's assume that I have a hypotetical programa program, foo.rb . That
> > program requires a library, as in
> > require 'bar'
> >
> > The problem is, I have 4 different versions of bar.rb and one bar.so,
> > and would like to know which one I am using. How would I go around
> > figuring this out?
>
> ruby -e '$LOAD_PATH.each {|dir| p Dir[File.join(dir,"bar.*")]}'
> ruby -e 'puts $LOAD_PATH.select {|dir| !
> Dir[File.join(dir,"bar.*")].empty?}'
>
> Kind regards
>
> robert
>
>