views:

49

answers:

1

I'm running multiple versions of Ruby (and Rails) on Windows and use Pik to switch between them. At the command line, I'm able to call

> pik list
186: ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
192: ruby 1.9.2p0 (2010-08-18) [i386-mingw32]

to get a list of ruby versions available, and use

> pik 192

> ruby -v
ruby 1.9.2p0 (2010-08-18) [i386-mingw32]

to make ruby 1.9.2 the active version:

I am not able to do the same in git bash:

 $ pik list
 sh.exe": pik: command not found

and the version of ruby is still 1.8.6

$ ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

It seems like git bash can't see the path to pik. Is there a way to alter the path within git bash or is there another way to run pik in git bash?

+1  A: 

Hello,

Please ensure you have the latest version of Pik installed (0.2.8), with it. open your user profile .bash_profile or similar under Git Bash and ensure it contains the following code:

[[ -s $USERPROFILE/.pik/.pikrc ]] && source $USERPROFILE/.pik/.pikrc

From there you should be able to invoke pik from the Git Bash terminal.

Hope that helps

Luis Lavena