CoffeScript (1.1.1) on Windows: simple method !

CoffeScript (1.1.1) on Windows: simple method !


To use CoffeScript you need:

  1. Node.js
  2. CoffeeScript
  3. Batch file to run CoffeeScript


STEP 1: Node.js


I’m very very lazy dev… 😀
And i don’t recompile NodeJs into Windows….. but I’m using v0.4.7 from [many thx]
and install into:

D:>cd ToolsNodeJsbin

D:ToolsNodeJsbin>node --version


STEP 2: CoffeeScript


Use the last version , grab it from
and install into:


Check version

D:ToolsNodeJsbinnode /cygdrive/D/Tools/CoffeeScript/bin/coffee --version
CoffeeScript version 1.1.1

Node.js need unix-path

Step 3: Batch file


I don’t know well bat syntax, and my code is VERY VERY ugly.. but it works 😛


@echo off

:: Directories of the tools
SET coffeeDir=D:ToolsCoffeescriptbin
SET nodeDir=D:ToolsNodeJsbin

:: var
SET a=%1
SET b=%2
SET c=%3
SET d=%4
SET e=%5
SET f=%6
SET g=%7
SET h=%8
SET i=%9

:: Check input value if exist and if it's option or file

IF "%a%"=="" GOTO :B
IF "%a:~0,1%"=="-" GOTO :B
FOR /f %%o IN ('%nodeDir%/cygpath.exe -a -u %1') DO SET a=%%o
IF "%b%"=="" GOTO :C
IF "%b:~0,1%"=="-" GOTO :C
FOR /f %%o IN ('%nodeDir%/cygpath.exe -a -u %2') DO SET b=%%o
IF "%c%"=="" GOTO 😀
IF "%c:~0,1%"=="-" GOTO 😀
FOR /f %%o IN ('%nodeDir%/cygpath.exe -a -u %3') DO SET c=%%o
IF "%d%"=="" GOTO :E
IF "%d:~0,1%"=="-" GOTO :E
FOR /f %%o IN ('%nodeDir%/cygpath.exe -a -u %4') DO SET d=%%o
IF "%e%"=="" GOTO :F
IF "%e:~0,1%"=="-" GOTO :F
FOR /f %%o IN ('%nodeDir%/cygpath.exe -a -u %5') DO SET e=%%o
IF "%f%"=="" GOTO :G
IF "%f:~0,1%"=="-" GOTO :G
FOR /f %%o IN ('%nodeDir%/cygpath.exe -a -u %6') DO SET f=%%o
IF "%g%"=="" GOTO :H
IF "%g:~0,1%"=="-" GOTO :H
FOR /f %%o IN ('%nodeDir%/cygpath.exe -a -u %7') DO SET g=%%o
IF "%h%"=="" GOTO :I
IF "%h:~0,1%"=="-" GOTO :I
FOR /f %%o IN ('%nodeDir%/cygpath.exe -a -u %8') DO SET h=%%o
IF "%i%"=="" GOTO :COMMAND
IF "%i:~0,1%"=="-" GOTO :COMMAND
FOR /f %%o IN ('%nodeDir%/cygpath.exe -a -u %9') DO SET i=%%o

FOR /f %%o IN ('%nodeDir%/cygpath.exe -a -u %coffeeDir%') DO SET p=%%o
%nodeDir%node %p%/coffee %a% %b% %c% %d% %e% %f% %g% %h% %i%


set the PATH environment variable contains a path to coffee.bat

the name of the file is very important,  in my case it works well with coffee-rack


Many thanks to:

Mikhail Nasyrov =>
Node.js self-contained Windows binaries =>
Jeremy Ashkenas =>

RMagick on Ruby 1.9.1 (i386-mingw32) Work !!! :D [UPDATE]

RMagick on Ruby 1.9.1 (i386-mingw32) Work !!! 😀
Ispirate from :
installing rmagick with mingw and ruby 1.9
but , on my laptop don’t work….

With Windows 7 work well:


1) Ruby =>
2) DevKit =>
3) ImageMagick =>
4) RMagick =>
5) type-windows.xml =>

Step 2: Install

1) Ruby => c:Ruby192
2) DevKit => c:DevKit
3) ImageMagick => c:ImageMagick-6.6.7-Q16 [WITH HEADER !!!!!!!]
3.a) Replace c:ImageMagick-6.6.7-Q16configtype-ghostscript.xml  with type-windows.xml
4) RMagick => c:rmagick-rmagick

Step 3: Set Enviroment variable

1) PATH = C:Ruby192bin;C:ImageMagick-6.6.7-Q16
2) CPATH = C:ImageMagick-6.6.7-Q16include
3) LIBRARY_PATH = C:ImageMagick-6.6.7-Q16lib

Step 4: Configure DevKit

1) cd c:DevKit
2) ruby dk.rb init
3) ruby dk.rb install
4) C:DevKitdevkitvars.bat (THANKS TO Joachim  =>

Step 5: Compile RMagick

1) run C:DevKitmsys.bat
2) cd /c/rmagick-rmagick
3) ruby setup.rb
4) ruby setup.rb install

Step 6: Check

1) ruby -v
        ruby 1.9.2p180 (2011-02-18) [i386-mingw32]
2) identify --version
    Version: ImageMagick 6.6.7-9 2011-02-21 Q16
	Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
	Features: OpenMP

If you experience problems concerning “extconf.rb”, you should try:

In my case :
1) Install Ruby 1.9.1 (i386-mingw32) from, direct link

2) Install Development Kit (DevKit) from, direct link

3) Install ImageMagick 6.5.6-8-Q8 from , direct link with header !!!!

4) Download Rmagick from source : , direct link or git clone git://

5) Replace !ImageMagick Path!configtype-ghostscript.xml with



6) Set enviroment variable :
set CPATH=!ImageMagick Path!include
set LIBRARY_PATH=!ImageMagick Path!lib
set PATH=!ImageMagick Path!
set PATH = !ruby_path!bin
set PATH = !ruby_path!devkitmsys1.0.11bin
set PATH = !ruby_path!devkitgcc3.4.5bin
7) run “ruby setup.rb” [EDIT] from msys.bat ( !ruby_path!devkitmsys1.0.11msys.bat ) [EDIT]


8) run “ruby setup.rb install” or “gem build *.gemspec” and “gem install *.gem”

9) Enjoy 😀

identify –version
Version: ImageMagick 6.5.6-8 2009-10-03 Q8 OpenMP
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC


ruby -v
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32]

Many thanks to :
Rmagick staff =>
rogerdpack =>
Alexey Borzenkov => not have link, sorry
Luis Lavena =>
RubyInstaller =>
RubyInstaller Group =>
puts WaYdotNET => Carlo Bertini