From: Justin Collins Date: 2006-12-06T15:43:32+09:00 Subject: Re: Apache and Ruby Phillip Neiswanger wrote: > Hi, > > New to ruby and apache. Been trying to get a simple ruby script to > run via apache. The script is as follows: > > #!/usr/bin/env ruby > require "cgi" > cgi = CGI.new("html3") > cgi.out("text/plain"){ > "Hello World" > } > > I attempt to access it with my browser via an address like: > http://127.0.0.1/script.rb. Apache is clearly not running ruby since > I get the script back verbatim to the browser. Plain html, ie no > ruby, is working. So far, in my search for an answer I haven't found > anything to alleviate my problems. Interestingly, I have eRuby > working, ie I can embed ruby code in my html, but not ruby. What > special Apache incantation do I need to get it working? I'm running > Opera/FireFox, Apache 2.2.3 and Ruby 1.8.5 on FreeBSD 6.1 system. I > am not interested in getting rails working right now, just ruby. > > Any help would be appreciated. > -- > phil Do you have mod_ruby installed? -Justin