[Instantrails-users] Fwd: An absolute minimal install of ruby and rails.
curt.hibbs at gmail.com
Tue Sep 19 10:07:09 EDT 2006
Nice! Is that a bat file or a cmd file? Will this run on both Win 2000 and
On 9/19/06, Tim Uckun <timuckun at gmail.com> wrote:
> "When you run InstantRails.exe in a new directory, he'll detect that
> and update all of those paths to the new location."
> Here is a cool trick I cooked up. Feel free to grab it and pass it on.
> I have written the following batch file, the REMs explain what is
> going on. This would work for most scripts I would think. You could
> expand it by doing even more trickery if you wanted to.
> @REM Generic Batch file for running ruby scripts
> @REM This file takes it's name, strips off the '.cmd' at the end
> @REM and then passes the remaining to the ruby executable in it's
> own directory.
> @REM It should be used in the ruby/bin directory.
> @REM EXAMPLE: if you wanted to run the cap script in the ruby/bin
> @REM you would copy this batch file to a file called cap.cmd.
> @REM this way you could set up a .cmd file for all the
> ruby scripts in your ruby/bin
> @set BINPATH=%~dp0
> @set RUBY=%BINPATH%ruby
> @set FILENAME=%~nx0
> @set SCRIPTNAME=%FILENAME:~0,-4%
> %RUBY% "%BINPATH%%SCRIPTNAME%" %*
> Instantrails-users mailing list
> Instantrails-users at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Instantrails-users