install:
get eruby from http://www.modruby.org/en/index.rbx/eruby/download.html
set link:
sudo ln -s /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/eruby /usr/local/bin/eruby
combine apache & erube:
set link:
ln -s /usr/local/bin/eruby /Library/WebServer/CGI-Executables/eruby
edit /etc/apache2/httpd.conf
(1) red part
AllowOverride None
Options FollowSymLinks
(2) add following to
AddHandler rubypage .erb .rhtml
Action rubypage /cgi-bin/eruby
run eruby:
eruby test.html.erb
erb
沒有留言:
張貼留言