On Thu, Nov 27, 2008 at 9:01 AM, Shane Witbeck <[EMAIL PROTECTED]>wrote:

> I'm updating a Buildr plugin I wrote a while back for IntelliJ IDEA and
> have
> a question:
>
> What's the best way of determining where the buildr script is located?
>
> I can make guesses depending on which platform is being used or get the
> path
> from running 'which buildr' on *nix platforms but I have no good way to
> check on Windows. Any ideas?
>

Buildr has a `which` method defined on rakelib/setup.rake that for windows
does the following:

       path = ENV['PATH'].split(File::PATH_SEPARATOR).map { |path|
path.gsub('\\', '/') }.map { |path| "#{path}/#{name}.{exe,bat,com}" }

If you installed buildr with rubygems the executable should live in the
GEM_HOME/bin directory, I guess GEM_HOME for windows (as installed by
"one-click ruby") should c:\ruby\lib\gems\1.8, but I could be wrong )

Reply via email to