Problem installing system_timer in windows


I recently started working on an existing Ruby On Rails application
which production environment is linux. However we are trying to create a
dev. platform with Eclipse in Windows and everything was working fine
until one of our classes was trying to import system_timer.

The initial error I got is:

no such file to load -- system_timer

Application Trace:

C:/Documents and
C:/Documents and
C:/Documents and

Ok so I figured I need to install system_timer so I opened a command
prompt and typed:

gem install system_timer

And got error:

'nmake' is not recognized as an internal or external command
operable program or batch file.

Hm, seems like I need some program called nmake. After some Googling it
seemed like nmake was some kind of build utility. So I downloaded it and
ran the install command again and got:

'cl' is not recognized as an internal or external command,
operable program or batch file.

Right, so I need a C compiler. After ALOT of searching and trial and
error with various windows C compilers I finally I managed to find and
install Microsoft Visual C++ Express Edition and opened an SVC prompt (a
command prompt with some env. settings) and tried the command for the
third time. This time I got a long stack trace which I will only show a
small excerpt here:

        cl -nologo -I. -Ic:/Ruby/lib/ruby/1.8/i386-mswin32
8/i386-mswin32 -I. -MD -Zi -O2b2xg- -G6 -c -Tcsystem_timer_native.c
cl : Command line warning D9035 : option 'Og-' has been deprecated and
will be r
emoved in a future release
cl : Command line warning D9002 : ignoring unknown option '-G6'
system_timer_native.c(10) : error C2061: syntax error : identifier
system_timer_native.c(10) : error C2059: syntax error : ';'
system_timer_native.c(11) : error C2061: syntax error : identifier

So it seems Visual Studios compiler is not compatible with whatever
compiler is needed to build system_timer and this is where I am stuck.
Where do I find a suitable C compiler for windows to build system_timer?
Or is there some other way to install system_timer in windows?

Im using Ruby 1.8x and Rails 2.2x. Really appreciate some help as I have
spent over 10 hours trying to fix this seemingly easy issue and as I am
really a Java developer I am not used to these kind of problems :confused:

Well the compiler you found might not be exactly the right one, with
all that stuff on windows about using the same compiler that was used
to build ruby itself and so on, but even assuming you got all that
sorted, the system_timer homepage ( says:

"SystemTimer only works on UNIX platforms (Mac OS X, Linux, Solaris,
BSD, …). You can install the gem on Microsoft Windows, but you will
only get a convenience shell wrapping a simple call to timeout.rb
under the cover."


Frederick Cheung wrote: