Errors when trying to run a single spec in JRuby

I asked this on the IRC room, but nobody was in there at the time, so
I’ll
try again here.

I am interested in running some RubySpecs and hopefully provide patches
to
fix, but the docs aren’t helping me much. So, I asked on the chat room
and
got some help (thanks, btw):

So I took a freshly cloned jruby.git repo and built it, then tried to
run a
specific spec:

PS C:> git clone GitHub - jruby/jruby: JRuby, an implementation of Ruby on the JVM
Cloning into jruby…
remote: Counting objects: 177102, done.
remote: Compressing objects: 100% (41667/41667), done.
remote: Total 177102 (delta 124498), reused 175988 (delta
123492)Receiving
objects: 100% (177102/177102), 79.75 MiB | 468 KiB/s
Receiving objects: 100% (177102/177102), 79.78 MiB | 470 KiB/s, done.
Resolving deltas: 100% (124498/124498), done.
PS C:> cd .\jruby
PS C:\jruby> ant spec:ci_interpreted_19
… lots of stuff, fails anyway [java] NameError: undefined local
variable or method ascii' for main:Object [java] (root) at -e:1 [java] NameError: undefined local variable or method ascii’ for
main:Object
[java] (root) at -e:1
[java]
[java] -----------------------------------------------------
[java] The rubyspec temp directory is not empty. Ensure that
[java] all specs are cleaning up temporary files.
[java] -----------------------------------------------------
[java]
[java] rake aborted!
[java] org.apache.tools.ant.ExitStatusException: Java returned: 1
[java]
[java] (See full trace by running task with --trace)

BUILD FAILED
C:\jruby\build.xml:1197: The following error occurred while executing
this
line:
C:\jruby\build.xml:1142: Java returned: 1

Total time: 15 minutes 12 seconds
PS C:\jruby> .\bin\jruby.bat spec/mspec/bin/mspec -T --1.9
.\spec\ruby\core\bignum\bit_and_spec.rb

Errno::ENOENT: No such file or directory - cannot execute

  • _exec_internal at org/jruby/RubyKernel.java:1584*
  •        exec at
    

file:/C:/jruby/lib/jruby.jar!/jruby/kernel19/kernel.rb:25*

  •         run at 
    

C:/jruby/spec/mspec/lib/mspec/commands/mspec.rb:168*

  •        main at C:/jruby/spec/mspec/lib/mspec/utils/script.rb:218*
    
  •      (root) at spec/mspec/bin/mspec:7*
    

The rubyspec temp directory is not empty. Ensure that
all specs are cleaning up temporary files.

PS C:\jruby>

So what does the 'Errno::ENOENT: No such file or directory - cannot
execute’error mean?

-Nick K.

This is very peculiar…I’m going to try to get a Windows VM up and
running and see if I can reproduce it.

Does the machine you’re running on have any peculiar filesystem
permissions? Are you running as an administrator? I’m not sure how
Windows handles permissions anymore, but that would be my first
thought…something’s odd about the filesystem permissions or your
rights to it.

  • Charlie

I had a similar problem when running the overarching specs on Windows XP
and it seems that the clone brings old binaries or some such things
(wasn’t
really clear). asariah helped me and ‘ant clean jar’ cleared things up
so
that the specs ran. Hope this helps.

Charles

On Thu, Dec 1, 2011 at 8:18 PM, Charles Oliver N.

On Thu, Dec 1, 2011 at 23:54, daidoji70 [email protected] wrote:

I had a similar problem when running the overarching specs on Windows XP
and it seems that the clone brings old binaries or some such things (wasn’t
really clear). asariah helped me and ‘ant clean jar’ cleared things up so
that the specs ran. Hope this helps.

I can create a jar just fine, but I seem not to be able to run any
single
spec without getting that error. I was thinking that maybe the syntax
was
goofy (differences between Windows and Mac users running one test) or
that
I needed to generate some other scaffolding somewhere else.

-Nick K.

Hmmm, sorry. I think ‘ant clean’ was the important part. You will have
to
rebuild after running that command though.

Charles