(Trying to) run lighttpd in development

This morning I’ve been spending some time on the Mac trying to get everything setup for RoR development. I found a nice rake task that should handle the permission problems (since we develop in Windows and OS X now). And I believe I have MySQL setup correctly (although there are still some annoying user permissions there, as well). So that leaves me with the development server. We chose to use lighttpd because webrick is rather slow, and I’ve heard nothing but good things about lighttpd (but that still doesn’t mean it’s good). It’s installed and working correctly, but my issues are with the config/lighttpd.conf file. I specified the server.port = 3000, but what I don’t get is when I run the application on 3000, then stop lighttpd (Ctrl+C), I can no longer run it again on that port. The only way I can get it to startup again is by going to the config/lighttpd.conf file and incrementing the port (say 3001), which I’m well aware of as being ridiculous. So, how do you get lighttpd to use the same port all the time? Or maybe I’m not properly shutting it down, where it really is still running on 3000 (meaning Ctrl+C is not enough)?

Also, if I try to run webrick on a port I haven’t used (i.e., $> script/server webrick -d 3010), I get binding errors. Is there something I should change for that, too?

I believe the problems are narrowed down to the development server (and maybe MySQL). I really should look into sqlite3, but I don’t want to get too much on my plate at once since I’m new to this environment.

Comments

01

Chris on Mon Jan 22 at 08:25AM

You should try mongrel as it’s quite fast in my opinion.

  1. sudo gem install mongrel
  2. mongrel_rails (takes same arguments as script/server)

02

Ryan on Tue Jan 23 at 03:52AM

I installed the gem without any problems, and I’m even able to run mongrel believe it or not, but I’m having issues somewhere along the way. For one, if I do mongrel_rails stop it freezes. And when I run my application, I’m getting 500 errors locally, which I haven’t figured out just yet. I’ll get it soon enough I suppose.

Have something to say?
Please rewrite the image text Are You Human? Hint: Are You Human? Formatting Tips

or

© 2009 Ryan Heath | Site Management A Ruby on Rails production.

Get in Touch