Pik 0.2.3 Released

pik version 0.2.3 has been released!

Pik is a tool to switch between multiple versions of ruby on Windows.

Or to put it another way

doskey rvm=pik $* # (sort of)

You have to tell it where your different ruby versions live using
‘pik add’. Then you can change to one by using ‘pik switch’.

It also supports running commands/code with all versions configured.

pik run # Runs commands on the command line
pik ruby # Runs using the ruby interpreter for each version
(ruby.exe, jruby.bat, ir.exe)
pik gem # Runs using the gem command for each version (gem.bat,
igem.bat)

== SYNOPSIS:

pik help commands

add             Adds another ruby location to pik.
checkup|cu      Checks your environment for current Ruby best 

practices.
config Adds/modifies configuration options.
default Switches back to the default settings.
gem Runs the gem command with all versions that pik is
aware of.
gemsync Duplicates gems from the current version to the
one specified.
help Displays help information.
implode Removes your pik configuration.
install|in Downloads and installs different ruby versions.
list|ls Lists ruby versions that pik is aware of.
remove|rm Removes a ruby location from pik.
ruby|rb Runs ruby with all versions that pik is aware of.
run Runs command with all versions of ruby that pik is
aware of.
switch|sw|use Switches ruby versions based on patterns.
tag Adds the given tag to the current version.
tags Runs the pik command against the given tags.

For help on a particular command, use ‘pik help COMMAND’.

== REQUIREMENTS:

Windows, more than one version of Ruby (otherwise, what’s the point?)
and Rubygems

== INSTALL:

  • If you’re upgrading from a version <= 0.1.1, you’ll want to delete
    the pik.bat file
    from all of your ruby versions. Gem uninstall should do the trick.

  • Install pik to a location that’s in your path, but someplace other
    than your ruby\bin dir
    If you’re upgrading from a more recent version, pik_install will
    overwrite the older files as needed.

    path
    PATH=C:\tools;C:\ruby\186-p368-mingw32\bin;C:\WINDOWS\system32;C:\WINDOWS

    pik_install C:\tools

  • If this is a first-time install, add all the versions of ruby that
    you want to use with pik

    pik add
    Adding: 186: ruby 1.8.6 (2009-03-31 patchlevel 368) [i386-mingw32]
    Located at: c:/ruby/186-p368-mingw32/bin

    pik add C:\ruby\IronRuby-091\bin
    Adding: 091: IronRuby 0.9.1.0 on .NET 2.0.0.0
    Located at: C:/ruby/IronRuby-091/bin

    pik add C:\ruby\jruby-1.4.0RC1\bin
    Adding: 140: jruby 1.4.0RC1 (ruby 1.8.7 patchlevel 174)
    (2009-09-30 80c263b) (Java HotSpot™ Client VM 1.6.0_14) [x86-java]
    Located at: C:/ruby/jruby-1.4.0RC1/bin

Note:

When using IronRuby, I have found that is necesary to configure the
GEM_HOME env. variable to a directory
inside of the IronRuby lib:

pik config gem_home=C:\ruby\ironruby-091\lib\ironruby\gems\1.8

Also, if you’re using a version of JRuby older than 1.4.0RC2, you’ll
probably need to set the JAVA_HOME env
variable.

set JAVA_HOME=C:\Program Files\Java\jre6

Changes:

0.2.3 / 2009-10-25

  • install command improvements - better error message on unrecognized
    implementation, better version picking, better directory naming,
    renamed some variables to be more concise (not everything is a version
  • implementations have versions, and versions have packages)
  • added remote option to list command
  • better error message when a version was deleted, but not removed
    from the config. Thanks Roger P.
  • bugfix: run/gem/ruby command hangs when waiting for input. Thanks
    Roger P.
  • renamed tools/pik.exe to pik_runner.exe to minimize
    confusion/conflicts. Thanks Luis L.
  • Upgraded to exerb 0.4.4. Thanks Alexey B.
  • Added documentation for tags commands. Thanks Luis L.
  • ‘pik tags’ with no options will display the help docs, instead of
    throwing a cryptic error.
  • Added docs for ruby and gem command. Improved docs for run command

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs