P
Phillip Neiswanger
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 =3D 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 incantati=
on =
do I need to get it working? I'm running Opera/FireFox, Apache 2.2.3 an=
d =
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.
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 =3D 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 incantati=
on =
do I need to get it working? I'm running Opera/FireFox, Apache 2.2.3 an=
d =
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.