# Webrick and scgi

**URL:** <https://www.ruby-forum.com/t/webrick-and-scgi/47568>\
**Category:** Rails\
**Created:** [November 12, 2005, 12:49pm UTC](https://www.ruby-forum.com/t/webrick-and-scgi/47568 "2005-11-12T12:49:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![snacktime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Post date:** [November 12, 2005, 12:49pm UTC](https://www.ruby-forum.com/t/webrick-and-scgi/47568/1 "2005-11-12T12:49:29Z")

</div>

I know this might sound strange at first, but how difficult would it be  
to  
write a plugin or module so webrick could run rails apps via scgi? While  
webrick seems to do great on it’s own, in my experience it’s been fairly  
unstable with rails. it consistantly dies on Freebsd under seemingly  
random  
conditions and fairly light load, and I’ve tried 4 different freebsd  
servers  
using 4.11 and 5.4. The same apps running under apache/lighttpd with  
fastcgi  
or scgi work fine.

Where I work we have one product and another coming up based on rails.  
We  
use them to provide a hosted service, but would also like to offer a  
distribution that clients can install on their own. The options are  
growing  
on a day to day basis, but so far I have not been able to find a  
solution  
that will let an end user install a rails app without having to go  
through  
considerable pain configuring apache with fastcgi or scgi. If webrick  
supported scgi then that would be another option for distributing rails  
apps  
that you can just unzip and run with the help of a couple included  
scripts.

How much work would this be? The scgi protocol seems simple enough, but  
I  
really have no idea how much work it would be to write an scgi handler  
for  
webrick.

Chris

---

<div class="post-metadata">

**Author:** ![snacktime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Post date:** [November 12, 2005, 12:49pm UTC](https://www.ruby-forum.com/t/webrick-and-scgi/47568/2 "2005-11-12T12:49:30Z")

</div>

How feasible is using InstantRails for distribution?

[http://instantrails.rubyforge.org/wiki/wiki.pl](http://instantrails.rubyforge.org/wiki/wiki.pl)

It seems to be stable and is extremely easy to setup.

Regards  
Brett

---

<div class="post-metadata">

**Author:** ![snacktime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Post date:** [November 12, 2005, 12:49pm UTC](https://www.ruby-forum.com/t/webrick-and-scgi/47568/3 "2005-11-12T12:49:30Z")

</div>

Curt, Instant Rails is awesome. What I should have written was How  
feasible  
would it for Chris to implement the project using Instant Rails.

Anyway, Thanks and keep up the great work!

Regards,  
Brett

---

<div class="post-metadata">

**Author:** ![snacktime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Post date:** [November 12, 2005, 12:49pm UTC](https://www.ruby-forum.com/t/webrick-and-scgi/47568/4 "2005-11-12T12:49:32Z")

</div>

as soon as it’s not just windows only I think it will be great, but  
right  
now it’s not something I can use.

Chris

---

<div class="post-metadata">

**Author:** ![snacktime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Post date:** [November 12, 2005, 12:49pm UTC](https://www.ruby-forum.com/t/webrick-and-scgi/47568/5 "2005-11-12T12:49:30Z")

</div>

On 11/9/05, Brett R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> How feasible is using InstantRails for distribution?
> 
> [http://instantrails.rubyforge.org/wiki/wiki.pl](http://instantrails.rubyforge.org/wiki/wiki.pl)
> 
> It seems to be stable and is extremely easy to setup.

I plan to use Instant Rails in medium to low volume production sights.

Curt

---

<div class="post-metadata">

**Author:** ![snacktime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Post date:** [November 12, 2005, 12:49pm UTC](https://www.ruby-forum.com/t/webrick-and-scgi/47568/6 "2005-11-12T12:49:34Z")

</div>

On 11/9/05, Curt H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On 11/9/05, snacktime [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > as soon as it’s not just windows only I think it will be great, but  
> > right  
> > now it’s not something I can use.
> 
> Yeah… I wish it was cross platform already, too. If only the powers  
> that be would grant my request for 72 hour days! 🙂

I wasn’t complaining, merely stating the fact that since unix support is  
mandatory we can’t use instant rails at this point. I see that the  
latest  
rails will use lighttpd instead of webrick if available. That could  
actually  
solve all my issues. Just include a lighttpd binary and modify the path  
so  
that script/server picks up the lighttpd binary that comes with the  
application.

Chris

---

<div class="post-metadata">

**Author:** ![snacktime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Post date:** [November 12, 2005, 12:49pm UTC](https://www.ruby-forum.com/t/webrick-and-scgi/47568/7 "2005-11-12T12:49:33Z")

</div>

On 11/9/05, snacktime [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> as soon as it’s not just windows only I think it will be great, but right  
> now it’s not something I can use.

Yeah… I wish it was cross platform already, too. If only the powers  
that be would grant my request for 72 hour days! 🙂

Curt
