From: Thufir Date: 2008-03-19T20:29:25+09:00 Subject: Re: using system to echo "hello world" gives SystemStackError On Wed, 19 Mar 2008 20:13:43 +0900, Todd Benson wrote: > I don't know anything about compile. But with #system, I think you are > supposed to have the parameter in quotes. > > Right now, your function is recursive with no exit. Yes, I'm kinda sorry that I posted that question. It's always like that, if I didn't post it then I would've spent a long time figuring it out, but if I post then I often get it fixed fairly quickly! Please do comment on the "right" way to do this, keeping in mind that it's partly a way of learning ruby: thufir@arrakis:~/sun_tutorial$ thufir@arrakis:~/sun_tutorial$ cat build.rb require 'clean' require 'compile' require 'run' clean compile run thufir@arrakis:~/sun_tutorial$ thufir@arrakis:~/sun_tutorial$ cat clean.rb def clean puts "cleaning all class files..." system("rm *.class -fv") end thufir@arrakis:~/sun_tutorial$ thufir@arrakis:~/sun_tutorial$ cat compile.rb def compile puts "compiling..." system("javac HelloWorldApp.java") end thufir@arrakis:~/sun_tutorial$ thufir@arrakis:~/sun_tutorial$ cat run.rb def run puts "running..." system("java HelloWorldApp") end thufir@arrakis:~/sun_tutorial$ thufir@arrakis:~/sun_tutorial$ ruby build.rb cleaning all class files... removed `HelloWorldApp.class' compiling... running... Hello World! thufir@arrakis:~/sun_tutorial$ thanks, Thufir