Setting cookies with apache eruby osx

Hi list,
I’m attempting to write a simple web app in ruby that uses cookies. I
can’t seem to get the program to set a cookie on the users browser. I’m
testing my “cookie setting ability” with this script from the Pragmatic
Guide:

<%
COOKIE_NAME = ‘chocolate chip’
require ‘cgi’
cgi = CGI.new
value = cgi.cookies[COOKIE_NAME]
if value.empty?
msg = “It looks like you haven’t visited recently”
else
msg = “You last visited #{values[0]}”
end
cookie = CGI::Cookie.new(COOKIE_NAME, Time.now.to_s)
cookie.expires = Time.now + 30243600
cgi.out(“cookie” => cookie){msg}
%>

The program isn’t throwing any errors.

On OSX, apache.
Any ideas?
Please…
Thank you