22 Jan, 2007

Published at 07:43AM

Tagged with development, problems, mac, work, and programming

This post has 2 comments

(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

Chris Monday, 22 Jan, 2007 Posted 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)

Ryan Tuesday, 23 Jan, 2007 Posted 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.

Do you have something to say about this post?
Retype the image to the right Spam Hint: Are You Human? Textile Formatting Tips

or

Ryan Heath | Site Management A Ruby on Rails production.

This site is a Formed Function. Formed Function LLC | @formedfunction | Get in Touch