pik file locations

45 views
Skip to first unread message

JimWiebe

unread,
Feb 9, 2011, 2:51:09 PM2/9/11
to pik help and suggestions
The Windows habit of putting everything on the C drive SUCKS, esp when
Win crashes due
to contamination/whatever and has to be wiped out and reloaded from an
image. Therefore I reserve the C drive on my [XP] system for OS ONLY
and all other stuff MUST go on other partition(s).

I have installed pik and ruby on the E drive, but I am having trouble
with paths, eg getting pik to put files where I want. It keeps
insisting on putting stuff on C. A snapshot of my files is below:

E:\>pik config
** CURRENT CONFIGURATION **
187: ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32] *
path: E:\Ruby187\bin
** GLOBAL CONFIGURATION **
--- {}
E:\>

E:\>pik ls
* 187: ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]
192: ruby 1.9.2p0 (2010-08-18) [i386-mingw32]

E:\>pik info
pik 0.2.8
ruby:
interpreter: "ruby"
version: "1.8.7"
date: "2010-08-16"
platform: "i386-mingw32"
patchlevel: "302"
full_version: "ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]"

homes:
gem: "E:\Ruby187\lib\ruby\gems\1.8"
ruby: "E:\Ruby187"

binaries:
ruby: "E:\Ruby187\bin"
irb: "E:\Ruby187\bin\irb.bat"
gem: "E:\Ruby187\bin\gem.bat"
rake: "E:\Ruby187\bin\rake.bat"

environment:
GEM_HOME: ""
HOME: "C:/Documents and Settings/User1"
IRBRC: ""
RUBYOPT: "rubygems"

file associations:
.rb:
.rbw:
E:\>

[E:\pik\pik.bat file:]
@ECHO OFF
"%~dp0pik_runner.exe" "%~f0" %*
IF EXIST "%USERPROFILE%\.pik\pik.bat" (call "%USERPROFILE%\.pik
\pik.bat")
--------------------------------------------
[ 'config.yml' file located at "C:/Documents and Settings/
User1/.pik"]
---
"187: ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]":
:path: !ruby/object:Pathname
path: E:/Ruby187/bin
"192: ruby 1.9.2p0 (2010-08-18) [i386-mingw32]":
:path: !ruby/object:Pathname
path: E:/Ruby192/bin
--- {}
Note: Above data is correct, but file should be located at E\pik
(or E\pik\.pik) instead of on drive C:
--------------------------------
[ '.pikrc' file located at "C:/Documents and Settings/User1/.pik"]
#!/bin/sh
pik_path=/e/pik

function pik {
$pik_path/pik_runner.exe pik.sh $@
[[ -s $USERPROFILE/.pik/pik.sh ]] && source $USERPROFILE/.pik/pik.sh
}
Note: Again, above data is correct, but file should be located at E
\pik
(or E\pik\.pik) instead of on drive C:
-------------------

So, my questions are:

1) What files do I edit to make E\pik the default location? [help
with correct syntax
would be appreciated!] (pik gem update put .gem into drive C.
ARGH! Did the same
with .vagrant....)

2) How do I control the path so that a new version of Ruby gets
installed
where I want? Just put full path as an argument in the 'install'
command?

3) When I want to UPDATE a version of Ruby (eg 187p302 to p330), how
do
I do that? 'Install' right over the top of the existing one, or
unzip the download
separately then copy files into the existing directory?

Your help is appreciated! Other than above, pik itself seems to be
working great!

Thanks.

Jim W.

Gordon Thiesfeld

unread,
Feb 9, 2011, 4:38:32 PM2/9/11
to discu...@googlegroups.com
Hi Jim,

On Wed, Feb 9, 2011 at 1:51 PM, JimWiebe <jpwie...@gmail.com> wrote:
[snip]


> So, my questions are:
>
> 1)  What files do I edit to make E\pik the default location?  [help
> with correct syntax
>      would be appreciated!]  (pik gem update put .gem into drive C.
> ARGH!  Did the same
>      with .vagrant....)
>

pik 0.2.8 is hardcoded to use %USERPROFILE% (sorry). Version 0.3.0,
which is currently in pre-release uses %PIK_HOME% first, then %HOME%
if %PIK_HOME% is not set, then %HOMEDRIVE%%HOMEPATH% if %HOME% is not
set.

So, for 0.2.8, you could unzip to E:\pik, and use pik add instead of
pik install. For 0.3.0, you can set PIK_HOME to E:\pik

> 2)  How do I control the path so that a new version of Ruby gets
> installed
>     where I want?  Just put full path as an argument in the 'install'
> command?

No, pik install will install to %PIK_HOME%\rubies\(ruby version)

>
> 3)  When I want to UPDATE a version of Ruby (eg 187p302 to p330), how
> do
>     I do that?  'Install' right over the top of the existing one, or
> unzip the download
>     separately then copy files into the existing directory?

Well, the point of pik is that you'd have two separate folders, one
for each version. But, that said, 0.3.0 will have a 'pik refresh'
command, so if you do overwrite a directory, it will fix the version
numbers.

>
> Your help is appreciated!  Other than above, pik itself seems to be
> working great!
>
> Thanks.
>
> Jim W.
>

> --
> You received this message because you are subscribed to the Google Groups "pik help and suggestions" group.
> To post to this group, send email to discu...@googlegroups.com.
> To unsubscribe from this group, send email to discuss_pik...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/discuss_pik?hl=en.
>
>

--
Gordon Thiesfeld
http://vert.igino.us

JimWiebe

unread,
Feb 9, 2011, 6:39:24 PM2/9/11
to pik help and suggestions
Gordon:
Thanks. That is helpful. Any sense of when 0.3.0 will be released?

Jim W.
---------------------------


On Feb 9, 1:38 pm, Gordon Thiesfeld <gthiesf...@gmail.com> wrote:
> Hi Jim,
>

Gordon Thiesfeld

unread,
Feb 10, 2011, 10:50:40 AM2/10/11
to discu...@googlegroups.com
On Wed, Feb 9, 2011 at 5:39 PM, JimWiebe <jpwie...@gmail.com> wrote:
> Gordon:
>  Thanks.  That is helpful.  Any sense of when 0.3.0 will be released?

I was hoping for last weekend ;-) I'll just leave it at "soon".

>
> Jim W.
> ---------------------------

Reply all
Reply to author
Forward
0 new messages