pik doesn't switch to installed rubies

131 views
Skip to first unread message

Sam Walton

unread,
Jan 28, 2014, 6:16:42 PM1/28/14
to discu...@googlegroups.com
I've been spending the last few days understanding how to get pik set up on Windows XP. I got in running in the CMD window and had installed ruby 200. Then I followed advice to move pik's files to  C:\bin to get around the namespace issue with Git Bash. Pik finally is seen by both environments.

I've added the 2.0.0 using pik add C:\Ruby200\bin\ and it shows up in the list. But I cannot switch to it and my ruby stays at 1.9.3. In a previous posting here it was recommended to remove .pik\pik_run.* files but I don't see any files like that.

In Git Bash:

pik ls
* 193: rub 1.9.3 …
  200:ruby 2.0.0p195 …

pik use 200

ruby -v
ruby 1.9.3

In CMD

pik ls
 
* 193: rub 1.9.3 …
  200:ruby 2.0.0p195 …

pik use 200
'\' is not recognized as an internal or external command

Unsure where that should be fixed. 

This is my setup but I would love if someone could link to the best setup and files that work with both the CMD and Git Bash.

gem install pik

pik_install C:\bin

RUBY_INSTALL_DIR=C:\Ruby

PIK_HOME=C:\bin

c:\Documents and Settings\sam\.bashrc
  [[ -s $PIK_HOME/contents/.pikrc ]] && source "$PIK_HOME/contents/.pikrc"

c:\bin\pik.bat
  

@ECHO OFF

"%~dp0pik_runner.exe" "%~f0" %*

IF EXIST "%USERPROFILE%\.pik\pik.bat" \(call "%USERPROFILE%\.pik\pik.bat"\)

c:\Documents and Settings\sam\.pik\.pikrc

#!/bin/sh

pik_path=/c/bin

function pik {

$pik_path/pik_runner.exe pik.sh $@

[[ -s $pik_path/pik.sh ]] && source $pik_path/pik.sh

}


echo $PATH  

/c/Documents and Settings/sam

/bin:.:/usr/local/bin:/mingw/bin:/bin:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/Program Files/Microsoft SQL Server/80/Tools/Binn/:/c/Program Files/OPOS/Epson2:/c/Program Files/Heroku/bin:/cmd:/c/RailsInstaller/Ruby1.9.3/bin:/c/Ruby200/bin:/c/Ruby/:/c/Program Files/Google/Chrome/Application:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/Program Files/Microsoft SQL Server/80/Tools/Binn/:/c/Program Files/OPOS/Epson2:/c/Documents and Settings/sam/My Documents/work/Git/cmd:/c/bin


c:\documents and settings\sam\.pik\pik.bat

SET PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\OPOS\Epson2;C:\Program Files\Heroku\bin;C:\Program Files\git\cmd;C:\Ruby200\bin;C:\Program Files\Google\Chrome\Application;C:\Documents and Settings\sam\My Documents\work\Git\cmd;C:\bin

SET GEM_PATH=

SET GEM_HOME=


And what's the deal that trying to add a new Ruby and it responds, "Pik isn't aware of an implementation called '2.0.0' for Windows?

thanks, sam

Luis Lavena

unread,
Jan 28, 2014, 6:21:37 PM1/28/14
to discu...@googlegroups.com
Hello Sam,

I strongly recommend you use something like Uru instead of Pik:


Pik has not been updated in the last 2 years, not to mention unable to detect newer versions of Ruby available.

Uru fill this gap, has been updated and works smoothly across platforms (using it on Windows, Linux and OSX).

Pik (and uru at this time) have issues with switching native Ruby from within a bash session, which is your case.

It should work without issues for the CMD issue.



--
You received this message because you are subscribed to the Google Groups "pik help and suggestions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss_pik...@googlegroups.com.
To post to this group, send email to discu...@googlegroups.com.
Visit this group at http://groups.google.com/group/discuss_pik.
For more options, visit https://groups.google.com/groups/opt_out.



--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

Sam Walton

unread,
Jan 29, 2014, 4:20:14 PM1/29/14
to discu...@googlegroups.com
Yes, thank you for replying. Unfortunately, uru is failing to switch rubies and my post of the error is in their queue. Looking for the best solution, thanx, sam
Reply all
Reply to author
Forward
0 new messages