# Lighttpd on mac for local development

**URL:** <https://www.ruby-forum.com/t/lighttpd-on-mac-for-local-development/72568>\
**Category:** Rails\
**Created:** [February 23, 2006, 11:56pm UTC](https://www.ruby-forum.com/t/lighttpd-on-mac-for-local-development/72568 "2006-02-23T23:56:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![TJ\_Stankus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/3e96dc/32.png) [@TJ\_Stankus](https://www.ruby-forum.com/u/TJ_Stankus)\
**Post date:** [February 23, 2006, 11:56pm UTC](https://www.ruby-forum.com/t/lighttpd-on-mac-for-local-development/72568/1 "2006-02-23T23:56:30Z")

</div>

I’m having trouble installing lighttpd for local development on Mac OS X  
Tiger.

Here are the commands I’ve run:  
sudo port install fcgi  
sudo port install lighttpd

Here’s a snippet from running “port installed” with several ports  
removed for brevity:  
fcgi @2.4.0\_1 (active)  
lighttpd @1.4.9\_0 (active)  
rb-rubygems @0.8.11\_0 (active)  
readline @5.0.005\_0+darwin\_8 (active)  
ruby @1.8.4\_1 (active)

So, it looks like everything is in place for installing the fcgi gem.  
But when I run  
“sudo gem install fcgi” I get the following error:

ruby extconf.rb install fcgi\nchecking for fcgiapp.h… yes  
checking for FCGX\_Accept() in -lfcgi… no

I’ve tried a few different things I’ve run across online, including  
running:

sudo gem install fcgi – --with-fcgi-include=/opt/local/include  
–with-fcgi-lib=/opt/local/lib

But no luck. Same error message each time. I’ve also tried installing  
from source without using ports and installing the rb-fcgi port.  
Everything gives me the same error.

Anyone have any thoughts on what else I might try?

Thanks!

-TJ

---

<div class="post-metadata">

**Author:** ![TJ\_Stankus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/3e96dc/32.png) [@TJ\_Stankus](https://www.ruby-forum.com/u/TJ_Stankus)\
**Post date:** [February 23, 2006, 11:59pm UTC](https://www.ruby-forum.com/t/lighttpd-on-mac-for-local-development/72568/2 "2006-02-23T23:59:33Z")

</div>

I dislike using ports, but that’s just a personal issue. 🙂

Try this instead…

[http://hivelogic.com/articles/2005/12/01/ruby\_rails\_lighttpd\_mysql\_tiger](http://hivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger)

-Sean

---

<div class="post-metadata">

**Author:** ![TJ\_Stankus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/3e96dc/32.png) [@TJ\_Stankus](https://www.ruby-forum.com/u/TJ_Stankus)\
**Post date:** [February 24, 2006, 12:08am UTC](https://www.ruby-forum.com/t/lighttpd-on-mac-for-local-development/72568/3 "2006-02-24T00:08:46Z")

</div>

Have you tried checking out from svn (see instructions on  
[http://www.lighttpd.net/download/](http://www.lighttpd.net/download/)) and building. That’s what I did and  
it’s working great. Alternatively, try Locomotive  
([http://locomotive.raaum.org](http://locomotive.raaum.org)).

TJ Stankus wrote:

> I’m having trouble installing lighttpd for local development on Mac OS X  
> Tiger.
> 
> Here are the commands I’ve run:  
> sudo port install fcgi  
> sudo port install lighttpd

---

<div class="post-metadata">

**Author:** ![TJ\_Stankus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/3e96dc/32.png) [@TJ\_Stankus](https://www.ruby-forum.com/u/TJ_Stankus)\
**Post date:** [February 24, 2006, 12:29am UTC](https://www.ruby-forum.com/t/lighttpd-on-mac-for-local-development/72568/4 "2006-02-24T00:29:57Z")

</div>

I worded things poorly in my OP. The problem is with installing the  
ruby-fcgi bindings, whether through gem, rb-fcgi port, or from source.

> [http://hivelogic.com/articles/2005/12/01/ruby\_rails\_lighttpd\_mysql\_tiger](http://hivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger)

I tried the FastCGI portion of these instructions. I got fastcgi  
installed from source just fine, but got an error installling the  
Ruby-FastCGI bindings.

I’m beginning to think I should try ruby 1.8.2.

-TJ

---

<div class="post-metadata">

**Author:** ![TJ\_Stankus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/3e96dc/32.png) [@TJ\_Stankus](https://www.ruby-forum.com/u/TJ_Stankus)\
**Post date:** [February 24, 2006, 12:26am UTC](https://www.ruby-forum.com/t/lighttpd-on-mac-for-local-development/72568/5 "2006-02-24T00:26:59Z")

</div>

I managed to get it working by following the instructions from here:

[http://nubyonrails.topfunky.com/articles/2005/12/29/an-even-better-way-to-build-ruby-rails-lighttpd-and-mysql-on-tiger](http://nubyonrails.topfunky.com/articles/2005/12/29/an-even-better-way-to-build-ruby-rails-lighttpd-and-mysql-on-tiger)

---

<div class="post-metadata">

**Author:** ![TJ\_Stankus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/3e96dc/32.png) [@TJ\_Stankus](https://www.ruby-forum.com/u/TJ_Stankus)\
**Post date:** [February 24, 2006, 12:45am UTC](https://www.ruby-forum.com/t/lighttpd-on-mac-for-local-development/72568/6 "2006-02-24T00:45:16Z")

</div>

Thanks to the pointer to that script Lori.

I think my next step is to circumvent ports altogether and compile  
everything from source. This script will help.

Thanks.

-TJ

---

<div class="post-metadata">

**Author:** ![TJ\_Stankus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/3e96dc/32.png) [@TJ\_Stankus](https://www.ruby-forum.com/u/TJ_Stankus)\
**Post date:** [February 24, 2006, 4:01am UTC](https://www.ruby-forum.com/t/lighttpd-on-mac-for-local-development/72568/7 "2006-02-24T04:01:44Z")

</div>

In case it helps anyone, I did get fcgi ruby bindings and everything  
else installed by following along with the script you can download  
from here:

[http://nubyonrails.topfunky.com/articles/2005/12/29/an-even-better-way-to-build-ruby-rails-lighttpd-and-mysql-on-tiger](http://nubyonrails.topfunky.com/articles/2005/12/29/an-even-better-way-to-build-ruby-rails-lighttpd-and-mysql-on-tiger)

For whatever reason, all the latest stuff available from darwinports  
just wasn’t allowing me to install the fcgi gem.

One thing you’ll want to do before running these scripts is run:

sudo gcc\_select 3.3

HTH
