VOOZH about

URL: https://rubychallenger.blogspot.com/search/label/windows

⇱ The Ruby Challenger: windows


Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Tuesday, April 5, 2011

How to run Ruby CGI scripts in Windows 7 with XAMPP

I use Ubuntu to develop my apps, but sometimes I need to run scripts in windows.

In a computer with Windows 7, I've installed Ruby and XAMPP. It runs PHP script very well, but when I tried to run a Ruby CGI script, I got the error:

Couldn't create child process: 720002

It's due to the "shebang" first line of the script:

#!/usr/bin/ruby

In my local installation, ruby is in:

C:\ruby\bin\ruby.exe

That's not much different from the linux path. I solved the problem by creating a symbolic link usr pointing to ruby at root directory. To do that, run cmd as Administrator and type:

c:
cd \
mklink /D usr ruby

That was enough to run my scripts. :)
Subscribe to: Posts (Atom)