From: Gale CC Date: 2007-06-29T02:52:06+09:00 Subject: Re: Ajax with Ruby problem > So the problem was not calling the script with the /cgi-bin > directory in the path ? > And the solution was pre-pending that to the path_to_script? No, I dont think just pre-pending "/cgi-bin" would do any magic. Here's what happened from the very beginning: First of all, I've configured Apache to "execute" anything under /cgi-bin by setting it as the Script-Alias. And then, for making Ajax work I was testing things inside /cgi-bin. I created a folder /ajax-test inside /cgi-bin, so my html as well as ruby scripts lied inside /cgi-bin/ajax-test/. But the Ruby was'nt being executed and the source code would show up instead of the output. Now after I put the html script outside the /cgi-bin folder, it all started working. So the solution to such a problem is keeping the html file (or whichever file is calling the script) outside the /cgi-bin folder, or for that matter whichever folder is set as the Script-Alias in your Apache configuration. Was I clear enough in explaining the problem and the solution ? Let me know if otherwise. Thanks all of you for all the help, Gale John Joyce wrote: > John Joyce > > > On Jun 28, 2007, at 2:51 AM, Gale CC wrote: > >> >>>> in this case when its run from inside a javascript script. Any idea >>> Normally, I would have to reference the cgi-bin directory as well, >> >> -- >> Posted via http://www.ruby-forum.com/. >> > > So the problem was not calling the script with the /cgi-bin > directory in the path ? > And the solution was pre-pending that to the path_to_script? > > Please post a clear solution, even if it is a link to a blog. this is > a most interesting problem and solution that should probably be on > the troubleshooting checklist for lots of people! > thx -- Posted via http://www.ruby-forum.com/.