Rails, Debian, Lighttpd, FastCGI

November 3, 2005 Link to post  Permalink

I spent a bunch of time getting some code running on a Debian configuration last night. Mostly, the instructions from the bougy man
are pretty good, but I ran into a few issues that weren’t covered there.

1. Debian Ruby package seems to suck. It looks like this is common knowledge, but still a pain. I had to build the Ruby code from scratch. Source downloads can be got from ruby-lang.org

2. You need to build FastCGI. This code can be got from fastcgi.com

3. The gems code is now up at version 0.8.11, so substitute those numbers in the RailsOnDebian instructions to get the latest.

4. The GEM for FastCGI may not be correct. You may need to build this yourself. I had another problem, so I may not have needed to do this.

5. My development environment is Windows. So when Rails generated my code, the script thing at the top of all the script files was generated as #c:/ruby…. which clearly won’t work on any form of Unix system. It took me 4 hours to work out that the reason mod_fastcgi in lighttpd was reporting ‘no such file or directory’ on my dispatch.fcgi file was not because it couldn’t find dispatch.fcgi, but because the first line was *#c:/ruby….". Once I fixed this, all was well in my world once again.

Now I’m going to try to get SwitchTower running on this configuration.