SystemTimer in windows

S

Shahin Kordasti

Has anyone been able to install SystemTimer in ruby windows environment?
It seems to need a C compiler and I have tried all kind of compilers and
none of them work :/
 
R

Roger Pack

Has anyone been able to install SystemTimer in ruby windows environment?
It seems to need a C compiler and I have tried all kind of compilers and
none of them work :/

Since it uses posix signals [and I'm not sure windows has posix signals]
cygwin might help.
=r
 
S

Shahin Kordasti

Roger said:
Since it uses posix signals [and I'm not sure windows has posix signals]
cygwin might help.
=r

Tried Cygwin but I get the error that cannot find cl command. Cygwin
uses gcc to compile C but not sure how I can tell the gem utility to do
that instead of cl.
 
R

Roger Pack

Tried Cygwin but I get the error that cannot find cl command. Cygwin
uses gcc to compile C but not sure how I can tell the gem utility to do
that instead of cl.

Double check your path carefully to make sure it is using only cygwin
gcc/cl etc.

It should compile at least:

packrd@ws-packrd ~ ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin]
packrd@ws-packrd ~
$ gem install SystemTimer
Building native extensions. This could take a while...
Successfully installed SystemTimer-1.1.1
1 gem installed

=r
 
S

Shahin Kordasti

Roger said:
Tried Cygwin but I get the error that cannot find cl command. Cygwin
uses gcc to compile C but not sure how I can tell the gem utility to do
that instead of cl.

Double check your path carefully to make sure it is using only cygwin
gcc/cl etc.

It should compile at least:

packrd@ws-packrd ~ ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin]
packrd@ws-packrd ~
$ gem install SystemTimer
Building native extensions. This could take a while...
Successfully installed SystemTimer-1.1.1
1 gem installed

=r

This is what I get:

eshakor@drww01 ~
$ ruby -v
ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]

eshakor@drww01 ~
$ gem install SystemTimer
bash: /cygdrive/c/Ruby/bin/gem:
D:/Users/Luis/projects/oss/oci/installer2-trunk/
ruby/bin/ruby.exe^M: bad interpreter: No medium found

No idea why it is looking in that path for ruby.exe. My path:

PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/Program
Files/Java/
jdk1.6.0_14/bin:/cygdrive/c/Ruby/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WI
NDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/Program
Files/TortoiseSVN/bi
n:/cygdrive/c/Program Files/MySQL/MySQL Server
5.0/bin:/cygdrive/c/Program Files
/Microsoft.NET/SDK/v1.1/Bin

So I go to where the ruby.exe is located and explicitly pointing out the
gem.bat and get:

eshakor@drww01 /cygdrive/c/Ruby/bin
$ ./gem.bat install SystemTimer
Building native extensions. This could take a while...
ERROR: Error installing SystemTimer:
ERROR: Failed to build gem native extension.

c:/Ruby/bin/ruby.exe extconf.rb install SystemTimer
creating Makefile

nmake

Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

cl -nologo -I. -Ic:/Ruby/lib/ruby/1.8/i386-mswin32
-Ic:/Ruby/lib/ruby/1.
8/i386-mswin32 -I. -MD -Zi -O2b2xg- -G6 -c -Tcsystem_timer_native.c
'cl' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code
'0x1'
Stop.


Gem files will remain installed in
c:/Ruby/lib/ruby/gems/1.8/gems/SystemTimer-1.
1.1 for inspection.
Results logged to
c:/Ruby/lib/ruby/gems/1.8/gems/SystemTimer-1.1.1/ext/system_ti
mer/gem_make.out

It cannot find command cl. So no clue what to do now... any ideas?
 
R

Roger Pack

D:/Users/Luis/projects/oss/oci/installer2-trunk/
ruby/bin/ruby.exe^M: bad interpreter: No medium found

No idea why it is looking in that path for ruby.exe. My path:

did you install the cygwin ruby package? cygwin gcc package?
=r
 
S

Shahin Kordasti

I reinstalled everything from scratch and it works now, atleast
installing. :)

Thanks
 
S

Shahin Kordasti

Shahin said:
I reinstalled everything from scratch and it works now, atleast
installing. :)

Thanks

Just want to add to others experiencing this problem. It seems that
having ruby installed previously to installing Cygwin causes problems as
there will be a conflict between Cygwin Ruby and windows Ruby.

I removed windows ruby and cygwin then reinstalled cygwin and now it
seems to be working. Just need to figure out how to let Eclipse know
where Ruby is now installed :)
 
R

Roger Pack

Just want to add to others experiencing this problem. It seems that
having ruby installed previously to installing Cygwin causes problems as
there will be a conflict between Cygwin Ruby and windows Ruby.

Path issue maybe? [both are in the path or what not].
=r
 
S

Shahin Kordasti

Roger said:
Just want to add to others experiencing this problem. It seems that
having ruby installed previously to installing Cygwin causes problems as
there will be a conflict between Cygwin Ruby and windows Ruby.

Path issue maybe? [both are in the path or what not].
=r

Yeah it was the path that was causing problems and the fact that I tried
to use the win32 Ruby inside Cygwin, apparently that does not work very
well.

Anyway, Cygwin ruby caused some other problems like MySQL gem not
working properly and Eclipse RadRails plugin had to be upgraded to 1.3
and other misc stuff.

If anyone else have problems installing Cygwin Ruby with Mysql and
Raidrails then send me a line and I will tell you how I finally made it
work.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top