Thanks David, those changes worked for me as well! Thanks also to Bill Agee - this is going to be a lot of fun to play with. It's nice to have a centralized location like this to run scripts from so that colleagues aren't required to install ruby, install (many) gems, etc.
- Adam -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brown, David Sent: Wednesday, March 28, 2007 3:39 PM To: [email protected] Subject: Re: [Wtr-general] watir execution from webserver I had the same issue where the script would execute but couldn't find any of the other 'required' files in the directory. To solve this problem, I had to add some code to the "runner\app\controllers\runner_controller.rb" specifying the test suite directory that the test should execute in. Now it is working Great! Here are the changes.: Def index ... suite_dir = "T:/my test suite" session[:suite_dir] = suite_dir #store it in the session so that it can be used by the runsuite action. ... End Def runsuite ... #added the argument: "-Cdirectory" ---> cd to directory, before executing your script cmd = "ruby -C#{session[:suite_dir]} [EMAIL PROTECTED] -f -v verbose > #{session[:console_filename]}" ... end -David Brown ------------------------------ Message: 5 Date: Wed, 28 Mar 2007 14:28:56 CDT From: John Lolis <[EMAIL PROTECTED]> areed, I have noticed that paths in ruby are relative to file that is being executed ( i think ). This has caused a couple of head scratching moments on my part while i wonder they files will no longer load using relative paths. I'm not sure this is related to your problem, hope it helps. _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
