views:

144

answers:

1

if my windows path looks like this:

c:\ruby\bin;c:\cygwin\bin

then when i go into cgywin and enter "ruby" it will execute the ruby from c:\ruby\bin, failing to find the ruby installed in my cygwin. I have to exclude that path so cygwin would execute the one from /usr/bin.

But i need those 2 paths, since i want to run ruby in windows too.

Anyway to have cygwin have its own path and not inherit those in windows?

thanks.

+2  A: 

Add an entry into your .profile to set the path to whatever you want it to be in cygwin.

In cygwin run the command:

$ <favourite text editor eg vi> ~/.profile

Then set the PATH environment variable to whatever you want it to be e.g.:

export PATH=/cygdrive/c/cygwin/bin

NOTE I can't remember whether you can use the c:... version of the path, but if you issue the env command you will see what it should be.

s1mm0t
thanks! works great.
David