[ANN] pik 0.2.1 Released

Discussion in 'Ruby' started by Gordon Thiesfeld, Oct 20, 2009.

  1. pik version 0.2.1 has been released!

    * <http://github.com/vertiginous/pik>
    * <http://rubyforge.org/projects/pik/>
    * <Gordon Thiesfeld>

    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'. You can also
    get new versions with 'pik install'.

    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:

    1. If you've used a version previous to this one, you'll need to uninstall them.
    Don't worry, this will leave your pik config intact.

    pik run "gem uninstall pik"

    2. Install the pik gem

    gem install pik

    3. You need to install pik to a location that's in your path, but
    someplace other than your ruby\bin dir

    >path

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

    >pik_install C:\tools


    4. 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(TM) Client VM 1.6.0_14) [x86-java]
    Located at: C:/ruby/jruby-1.4.0RC1/bin


    Changes:

    ### 0.2.1 / 2009-10-19

    * bugfix - path to pik could have spaces - thanks, Dominic Sisneros
    * update install instructions

    ### 0.2.0 / 2009-10-18

    * pik is now an exerb compiled executable, and must be installed to a
    location that is in the system path, but is seperate from ruby
    * added pik_install command
    * added support for IronRuby and Jruby
    * added install command to install new Ruby versions
    * added tag and tags command
    * added cucumber functional tests
    * updated gem post-install message
    * changed pik run to run in ruby instead of in a batch file.
    * Added pik ruby and pik gem commands.
    Gordon Thiesfeld, Oct 20, 2009
    #1
    1. Advertising

  2. [Note: parts of this message were removed to make it a legal post.]

    Thanks GordonC:\Documents and Settings\dominic e sisneros>pik install jruby
    ** Downloading:
    http://dist.codehaus.org/jruby/1.4.0RC1/jruby-bin-1.4.0RC1.zip
    to: C:\Documents and Settings\dominic e sisneros\My
    Documents\.pik\downloads\jruby-bin-1.4.0RC1.zip


    ** Extracting: C:\Documents and Settings\dominic e sisneros\My
    Documents\.pik\downloads\jruby-bin-1.4.0RC1.zip
    to: C:\Documents and Settings\dominic e sisneros\My
    Documents\bin\pik\jruby_140RC1
    done

    'C:\Documents' is not recognized as an internal or external command,
    operable program or batch file.

    There was an error
    Error: private method `gsub' called for nil:NilClass

    in: pik/commands/command.rb:123:in `get_version'
    in: pik/commands/add_command.rb:23:in `add'
    in: pik/commands/add_command.rb:13:in `execute'
    in: pik/commands/install_command.rb:104:in `add'
    in: pik/commands/install_command.rb:55:in `execute'
    in: pik:35

    One other problem when installing jruby I get the following output:


    >
    Dominic Sisneros, Oct 20, 2009
    #2
    1. Advertising

  3. On 20/10/09 06:49 , Dominic Sisneros wrote:
    > Thanks GordonC:\Documents and Settings\dominic e sisneros>pik install jruby
    > ** Downloading:
    > http://dist.codehaus.org/jruby/1.4.0RC1/jruby-bin-1.4.0RC1.zip
    > to: C:\Documents and Settings\dominic e sisneros\My
    > Documents\.pik\downloads\jruby-bin-1.4.0RC1.zip
    >
    >
    > ** Extracting: C:\Documents and Settings\dominic e sisneros\My
    > Documents\.pik\downloads\jruby-bin-1.4.0RC1.zip
    > to: C:\Documents and Settings\dominic e sisneros\My
    > Documents\bin\pik\jruby_140RC1
    > done
    >
    > 'C:\Documents' is not recognized as an internal or external command,
    > operable program or batch file.
    >

    OK, this is a typical problem in the Windows world :)
    You need to put the path containing spaces in "" so that it is
    interpreted as a single command line parameter (and with you I guess I
    mean Rob since this seems to be a pik internal hitch).
    It's a good idea to always wrap paths in windows in "" - you never know
    when somebody is going to use "My Documents" :)
    Cheers,
    V.-

    --
    http://www.braveworld.net/riva
    Vassilis Rizopoulos, Oct 20, 2009
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gordon Thiesfeld

    [ANN] pik 0.1.0 Released

    Gordon Thiesfeld, Sep 24, 2009, in forum: Ruby
    Replies:
    2
    Views:
    93
    Luis Lavena
    Oct 7, 2009
  2. Gordon Thiesfeld

    [ANN] pik 0.2.2 Released

    Gordon Thiesfeld, Oct 21, 2009, in forum: Ruby
    Replies:
    0
    Views:
    79
    Gordon Thiesfeld
    Oct 21, 2009
  3. Gordon Thiesfeld

    [ANN] pik 0.2.3 Released

    Gordon Thiesfeld, Oct 26, 2009, in forum: Ruby
    Replies:
    0
    Views:
    109
    Gordon Thiesfeld
    Oct 26, 2009
  4. Gordon Thiesfeld

    [ANN] pik 0.2.5 Released

    Gordon Thiesfeld, Nov 2, 2009, in forum: Ruby
    Replies:
    0
    Views:
    104
    Gordon Thiesfeld
    Nov 2, 2009
  5. Gordon Thiesfeld

    [ANN] pik 0.2.7 Released

    Gordon Thiesfeld, Jun 16, 2010, in forum: Ruby
    Replies:
    0
    Views:
    103
    Gordon Thiesfeld
    Jun 16, 2010
Loading...

Share This Page