From gthiesfeld at gmail.com Mon Oct 19 01:15:32 2009 From: gthiesfeld at gmail.com (Gordon Thiesfeld) Date: Mon, 19 Oct 2009 00:15:32 -0500 Subject: [Rubyinstaller-devel] [ANN] pik 0.2.0 Released Message-ID: pik version 0.2.0 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: 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.0 / 2009-10-18 * pik is now an exerb compile 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. From jon.forums at gmail.com Mon Oct 19 09:21:41 2009 From: jon.forums at gmail.com (Jon) Date: Mon, 19 Oct 2009 09:21:41 -0400 Subject: [Rubyinstaller-devel] [ANN] pik 0.2.0 Released In-Reply-To: References: Message-ID: <20091019092141.420284d7.jon.forums@gmail.com> > pik version 0.2.0 has been released! > > * > * > > Pik is a tool to switch between multiple versions of ruby on Windows. Should pik be added to http://rubyinstaller.org/addons.html If yes, what's the 1-sentence intro? Jon From dsisnero at gmail.com Mon Oct 19 12:33:45 2009 From: dsisnero at gmail.com (Dominic Sisneros) Date: Mon, 19 Oct 2009 10:33:45 -0600 Subject: [Rubyinstaller-devel] [ANN] pik 0.2.0 Released In-Reply-To: References: Message-ID: 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gthiesfeld at gmail.com Mon Oct 19 13:28:08 2009 From: gthiesfeld at gmail.com (Gordon Thiesfeld) Date: Mon, 19 Oct 2009 12:28:08 -0500 Subject: [Rubyinstaller-devel] [ANN] pik 0.2.0 Released In-Reply-To: References: Message-ID: 2009/10/19 Dominic Sisneros : > 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 pik. 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 C:\tools 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 C:\tools/pik pik is installed This will create the following directories and files: c:\tools |-- 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. From dsisnero at gmail.com Mon Oct 19 14:19:43 2009 From: dsisnero at gmail.com (Dominic Sisneros) Date: Mon, 19 Oct 2009 12:19:43 -0600 Subject: [Rubyinstaller-devel] [ANN] pik 0.2.0 Released In-Reply-To: References: Message-ID: > Hi Dominic, > > Where did you install pik? Are you trying to call pik.exe, or pik.bat? > C:\Documents and Settings\dominic e sisneros>pik_install "c:\Documents and Settings\dominic e sisneros\My Documents\bin"\ Thank you for using pik. Installing to c:\Documents and Settings\dominic e sisneros\My Documents\bin\ cp C:/ruby/lib/ruby/gems/1.8/gems/pik-0.2.0/bin/../tools/pik.bat c:\Documents and Settings\dominic e sisneros\My Documents\bin\ mkdir -p c:\Documents and Settings\dominic e sisneros\My Documents\bin\pik cp C:/ruby/lib/ruby/gems/1.8/gems/pik-0.2.0/bin/../tools/pik/pik.exe c:\Documents and Settings\dominic e sisneros\My Documents\bin\pik pik is installed PATH contains c:\Documents and Settings\dominic e sisneros\My Documents\bin\ -------------- next part -------------- An HTML attachment was scrubbed... URL: From gthiesfeld at gmail.com Mon Oct 19 14:41:48 2009 From: gthiesfeld at gmail.com (Gordon Thiesfeld) Date: Mon, 19 Oct 2009 13:41:48 -0500 Subject: [Rubyinstaller-devel] [ANN] pik 0.2.0 Released In-Reply-To: References: Message-ID: 2009/10/19 Dominic Sisneros : > PATH contains > > c:\Documents and Settings\dominic e sisneros\My Documents\bin\ > Ah, there's a bug involving paths with spaces. https://gist.github.com/c8849da7e88ab12a4b25 The error looks very similar to the scenario I described. I'll try to release a fix for this soon. If you want, you could modify your pik.bat like this: --- a/tools/pik.bat +++ b/tools/pik.bat @@ -1,2 +1,2 @@ @ECHO OFF -"%~dpn0\%~n0.exe" %~dpf0 %* +"%~dpn0\%~n0.exe" "%~dpf0" %* That works for me. https://gist.github.com/b47d1044bc478aa16955 From dsisnero at gmail.com Mon Oct 19 15:39:53 2009 From: dsisnero at gmail.com (Dominic Sisneros) Date: Mon, 19 Oct 2009 13:39:53 -0600 Subject: [Rubyinstaller-devel] [ANN] pik 0.2.0 Released In-Reply-To: References: Message-ID: > > The error looks very similar to the scenario I described. I'll try to > release a fix for this soon. If you want, you could modify your > pik.bat like this: > > --- a/tools/pik.bat > +++ b/tools/pik.bat > @@ -1,2 +1,2 @@ > @ECHO OFF > -"%~dpn0\%~n0.exe" %~dpf0 %* > +"%~dpn0\%~n0.exe" "%~dpf0" %* > That worked, Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From gthiesfeld at gmail.com Mon Oct 19 19:21:17 2009 From: gthiesfeld at gmail.com (Gordon Thiesfeld) Date: Mon, 19 Oct 2009 18:21:17 -0500 Subject: [Rubyinstaller-devel] [ANN] pik 0.2.1 Released Message-ID: pik version 0.2.1 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) Changes: ### 0.2.1 / 2009-10-19 * bugfix - path to pik could have spaces - thanks, Dominic Sisneros * update install instructions From gthiesfeld at gmail.com Wed Oct 21 13:18:08 2009 From: gthiesfeld at gmail.com (Gordon Thiesfeld) Date: Wed, 21 Oct 2009 12:18:08 -0500 Subject: [Rubyinstaller-devel] [ANN] pik 0.2.0 Released In-Reply-To: <20091019092141.420284d7.jon.forums@gmail.com> References: <20091019092141.420284d7.jon.forums@gmail.com> Message-ID: On Mon, Oct 19, 2009 at 8:21 AM, Jon wrote: > Should pik be added to http://rubyinstaller.org/addons.html > I'll let someone else make that determination ;-) > If yes, what's the 1-sentence intro? > Just for fun, I set up a google group for pik[1]. Here's what I put in the description: Pik is a tool to switch between multiple versions of Ruby on Windows. If you'd like to try out different Ruby implementations for Windows, but you don't want to wreck your current Ruby setup, pik is for you. (sorry, two sentences...) [1] http://groups.google.com/group/discuss_pik > Jon > _______________________________________________ > Rubyinstaller-devel mailing list > Rubyinstaller-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubyinstaller-devel > From jon.forums at gmail.com Wed Oct 21 13:34:29 2009 From: jon.forums at gmail.com (Jon) Date: Wed, 21 Oct 2009 13:34:29 -0400 Subject: [Rubyinstaller-devel] [ANN] pik 0.2.0 Released In-Reply-To: References: <20091019092141.420284d7.jon.forums@gmail.com> Message-ID: <20091021133429.28c1f9f0.jon.forums@gmail.com> > On Mon, Oct 19, 2009 at 8:21 AM, Jon wrote: > > Should pik be added to http://rubyinstaller.org/addons.html > > > > I'll let someone else make that determination ;-) > I'm taking silence as assent, so up it goes to the addon's page :) Jon