vertiginous / pik

Ruby version manager for Windows
830 stars 122 forks source link

Pik Use does nothing, "ruby is not recognized" command after selecting #135

Closed indigo0086 closed 12 years ago

indigo0086 commented 12 years ago

I installed pik 0.3.0.pre via the installer, installed 7-zip then ran the commands

C:\Users\Daniel>pik list
   ruby-1.9.2-p136

C:\Users\Daniel>pik use ruby-1.9.2-p136

C:\Users\Daniel>ruby -v
'ruby' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Daniel>pik info
pik 0.3.0.pre on Microsoft Windows [Version 6.1.7601]
by Gordon Thiesfeld (gthiesfeld@gmail.com)

Pik info will not work unless there is a version of ruby in the path.

You can use pik use to add one.

C:\Users\Daniel>
luislavena commented 12 years ago

Did you relocate your Ruby 1.9.2 installation?

Can you provide us the value of PATH environment variable and also the output of pik list -v?

indigo0086 commented 12 years ago

I did not move the installation, I am using it wherever it was when I did pik install 1.9.2

C:\Windows\System32>set PATH
Path=C:\pik\;...
luislavena commented 12 years ago

@indigo0086 for me to help you you need to provide me the entire information I'm asking to you.

You snipping the path to show me just pik doesn't help me figure out if Pik is doing it's job on setting the PATH to the directory where Ruby 1.9.2 is installed.

You have also omitted to tell me if that version of Ruby was installed by Pik itself or not, which having the output of pik list -v as requested would have helped me.

Please, help me help you.

indigo0086 commented 12 years ago

output of pik list -v

C:\Windows\System32>pik list -v
   ruby-1.9.2-p136
        version: ruby 1.9.2p136 (2010-12-25) [i386-mingw32]
        path: C:\Users\Daniel\.pik\rubies\ruby-1.9.2-p136\bin

As for the path, the ruby bin directory is never set, which is why I'm getting the ruby command not found issue.

luislavena commented 12 years ago

As for the path, the ruby bin directory is never set

You mean the directory is never added to the PATH, ok.

Can you tell me how pik.bat looks like (paste it here) and the contents of C:\Users\Daniel\.pik\pik_run.bat too?

Also, do you have HOME environment variable set on your system?

indigo0086 commented 12 years ago

After looking at the contents of the bat file I had to set the PIK_HOME variable to get it to work. I didn't see that in the documentaiton page

luislavena commented 12 years ago

See #118, the batch files are not as smart as expected.

Perhaps you can submit a improvement to the README?