Ruby for CGI

Can I write simple CGI scripts in Ruby? If so, what should the file extension be, and do I need to take any steps beyond chmod’ing to 755 to get them to execute? Thanks.