I’ve got a Rails app, and I’ve been asked to include some PHP pages in
the site. They don’t need to interact with the Rails app itself (I’d
treat them much like GIF files), but I’d still like to be able to
access them at development time using WEBRick.
What do I need to add to ./script/server to support PHP pages?
WEBRick is just for serving ruby, but you can have another server
serving php. By default WEBrick runs on port 3000 so you could serve
your php files with apache on port 80 in development.
If you are developing on windows you can use InstantRails which is a
self contained package with rails, php, mysql and apache. It doesn’t
install anything to your system, you just start it and go, there is a
folder for php and other html files and php files to run on apache and
a rails folder your rails app to run on WEBrick. For deployment you
will need a server that can run both your rails app and php, but for
development this is the setup that I have and it works great.