[Rubyinstaller-devel] [ANN] pik 0.2.0 Released

Gordon Thiesfeld gthiesfeld at gmail.com
Mon Oct 19 13:28:08 EDT 2009

2009/10/19 Dominic Sisneros <dsisnero at gmail.com>:
> Hi,
> My computer at work is so locked down, I can't run this new version of pik :
> C:\Documents and Settings\dominic e sisneros>pik --help
> pik/batch_file.rb:18:in `read': Permission denied - C:/Documents
> (Errno::EACCES)
>         from pik/batch_file.rb:18:in `initialize'
>         from pik/batch_file.rb:5:in `new'
>         from pik/batch_file.rb:5:in `open'
>         from pik/commands/command.rb:50:in `clean_gem_batch'
>         from pik:10

Hi Dominic,

Where did you install pik?  Are you trying to call pik.exe, or pik.bat?

Pik.exe should not be called directly, it should only be called from
the batch file.  The batch file serves a very important purpose for

Here's an installation scenario.  I need to install pik to some
location different from ruby, because the current version of ruby
isn't always going to be in the path.  I create a directory, C:\tools,
and add it to the system path (preferably through the gui, so that it
will persist to new cmd sessions).  Once I've done this, I run:

>pik_install C:\tools
Thank you for using pik.

Installing to C:\tools

cp c:/ruby/186-p368-mingw32/lib/ruby/gems/1.8/gems/pik-0.2.0/bin/../tools/pik.bat
mkdir -p C:\tools/pik
cp c:/ruby/186-p368-mingw32/lib/ruby/gems/1.8/gems/pik-0.2.0/bin/../tools/pik/pik.exe

pik is installed

This will create the following directories and files:

|-- pik
|   `-- pik.exe
`-- pik.bat

Now, since C:\tools is on the system path, when you run pik at the
command line, you're actually running pik.bat.  Pik.bat will call
pik.exe, which works it's magic.  It will sometimes - like in the case
of the switch command - update pik.bat, and extra commands will then
be executed after pik.exe is finished.  This is how environment
variables are updated.  It's necessary to do this, because changes
made to the environment by a ruby process will disappear when the ruby
process finishes.  Changes made to the environment in a batch file are
persistent, since a batch file is not running as a separate process.

This may be more detail than you need, but I need to write this up
anyway, and I was on a roll ;-)  If you need more help, let me know.

More information about the Rubyinstaller-devel mailing list