Instructions:
If you’ve already got Rails up and running but are just running into issues with Apache, see the bottom of this document.
You can build ruby and ruby-gems from source and there are some old instructions below. However if you have a fast internet connection, OpenBSD provides binaries to these same packages. As of OpenBSD 4.3 you get ruby-1.8.6p111 and ruby-gems-1.0.1.
# Please choose a mirror near you
export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/4.3/packages/i386
pkg_add ruby ruby-gems ruby-iconv mysql-server mysql-client
gem install rails
gem install mysql
Next you’ll need to…
Deal with Rails inside of the Chrooted Apache:
_See HowtoSetupChrootedApacheWithRailsOnOpenBSD _
Alternatively you can disable the httpd chroot using the -u option. See the httpd man page for more information. You’ll want to modify or add httpd_flags="-u" to /etc/rc.conf.local then start or restart Apache.
Using Rails with Lighttpd and \FastCGI
Assuming \FastCGI was installed as decribed above
Install Lighttpd from ports
# cd /usr/ports/www/lighttpd && make install
Edit /etc/lighttpd.conf as described here
Start Lighttpd (add this to rc.local for automation)
/usr/local/sbin/lighttpd -f /etc/lighttpd.conf