jspec and cygwin

4 views
Skip to first unread message

Thiago F. G. Albuquerque

unread,
Mar 12, 2010, 5:46:21 PM3/12/10
to jspec
Hi,

Has anyone ever tried jspec with cygwin?

I managed to install the ruby gem, but... it doesn't work :)

$ jspec init jspec-test
Template initialized at `jspec-test'

$ cd jspec-test/

$ jspec run --rhino
Unable to access jarfile /usr/lib/ruby/gems/1.8/gems/jspec-3.3.2/
support/js.jar


This file (/usr/lib/ruby/gems/1.8/gems/jspec-3.3.2/support/js.jar)
exists. My guess is that the JVM is expecting a windows path -- and is
receiving a UNIX one.

Any ideas on how I could solve or debug this?

Regards,
Thiago

vision media [ Tj Holowaychuk ]

unread,
Mar 12, 2010, 6:49:48 PM3/12/10
to js...@googlegroups.com
hmm not positive sorry! I dont / never really have developed on windows,
hopefully never will lol


--
JSpec thanks you for your interest and support! To post simply reply
to this email.

documentation: http://jspec.info
unsubscribe: jspec+un...@googlegroups.com
group: http://groups.google.com/group/jspec



--
Tj Holowaychuk
Vision Media
President & Creative Lead

Thiago Albuquerque

unread,
Apr 6, 2010, 11:03:01 AM4/6/10
to js...@googlegroups.com
My guess is that the JVM is expecting a windows path -- and is receiving a UNIX one.

This is exactly what was happening. I created a wrapper script (attached) that converts absolute paths to UNIX format before calling the JVM.

It has to be called "java" (I created a symlink) and it has to be placed before the real, $JAVA_HOME/bin/java in $PATH.

This doesn't solve all the problems, though:

$ jspec run --rhino
js: uncaught JavaScript runtime exception: ReferenceError: "JSpec" is not defined.

Apparently, rhino too has problems with absolute paths :) This one I didn't look into (yet). But there is a workaround: use --freeze when creating the project, and then the paths to JSpec files won't be absolute.


 
java.rb
Reply all
Reply to author
Forward
0 new messages