[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

mod_ruby & rails doc?

Aquila

1/11/2005 12:40:00 PM

Is there a place where I can find information on using mod_ruby? A single
stupid example will do, I just can't find anything...
I guess once I get mod_ruby working rails will work too? I don't find any
information on that combination either.

I'm anxious to start using rails!
--
"May the source be with you"
13 Answers

Dick Davies

1/11/2005 12:59:00 PM

0

* Aquila <braempje@netscape.net> [0156 12:56]:
> Is there a place where I can find information on using mod_ruby? A single
> stupid example will do, I just can't find anything...

http://www.m... ?

> I guess once I get mod_ruby working rails will work too? I don't find any
> information on that combination either.
>
> I'm anxious to start using rails!

you don't need modruby to use rails.

--
'Oh how awful. Did he at least die peacefully? ....To shreds you say, tsk tsk tsk.
Well, how's his wife holding up? ....To shreds, you say...'
-- Prof. Farnsworth
Rasputin :: Jack of All Trades - Master of Nuns


Aquila

1/11/2005 3:48:00 PM

0

Dick Davies wrote:

>> Is there a place where I can find information on using mod_ruby? A single
>> stupid example will do, I just can't find anything...
>
> http://www.m... ?
>
It will probably be my fault but I can't find any example on modruby.net? I
really can't find a complete script...

>> I guess once I get mod_ruby working rails will work too? I don't find any
>> information on that combination either.
>>
>> I'm anxious to start using rails!
>
> you don't need modruby to use rails.

But if I prefer not to use CGI I read it's possible to use Rails with
mod_ruby. Or am I misinformed?
--
"May the source be with you"

Brian McCallister

1/11/2005 4:11:00 PM

0

You can use it with mod_ruby. I think FastCGI is probably used more
(happens to be what I use as well) and is quite performant.

-Brian

On Jan 11, 2005, at 10:51 AM, Aquila wrote:

> Dick Davies wrote:
>
>>> Is there a place where I can find information on using mod_ruby? A
>>> single
>>> stupid example will do, I just can't find anything...
>>
>> http://www.m... ?
>>
> It will probably be my fault but I can't find any example on
> modruby.net? I
> really can't find a complete script...
>
>>> I guess once I get mod_ruby working rails will work too? I don't
>>> find any
>>> information on that combination either.
>>>
>>> I'm anxious to start using rails!
>>
>> you don't need modruby to use rails.
>
> But if I prefer not to use CGI I read it's possible to use Rails with
> mod_ruby. Or am I misinformed?
> --
> "May the source be with you"
>
>



Sarah Tanembaum

1/11/2005 9:30:00 PM

0

Brian McCallister wrote:
> You can use it with mod_ruby. I think FastCGI is probably used more
> (happens to be what I use as well) and is quite performant.
>
> -Brian
>
> On Jan 11, 2005, at 10:51 AM, Aquila wrote:
>
>> Dick Davies wrote:
>>
>>>> Is there a place where I can find information on using mod_ruby? A
>>>> single
>>>> stupid example will do, I just can't find anything...
>>>
>>>
>>> http://www.m... ?
>>>
>> It will probably be my fault but I can't find any example on
>> modruby.net? I
>> really can't find a complete script...
>>
>>>> I guess once I get mod_ruby working rails will work too? I don't
>>>> find any
>>>> information on that combination either.
>>>>
>>>> I'm anxious to start using rails!
>>>
>>>
>>> you don't need modruby to use rails.
>>
>>
>> But if I prefer not to use CGI I read it's possible to use Rails with
>> mod_ruby. Or am I misinformed?
>> --
>> "May the source be with you"
>>
>>
>
>
>
Using the mod_ruby gives web application more bags of tools that comes
with Apache, just like the mod_php. And also, it is easier to manage
since it is integrated with Apache.

Some have claimed that FastCGI is faster than mod_ruby, can anyone
validate these claims? Because I can hardly believe that CGI is faster
than the embedded interpreter.

Thanks

David Heinemeier Hansson

1/11/2005 10:15:00 PM

0

> Using the mod_ruby gives web application more bags of tools that comes
> with Apache, just like the mod_php. And also, it is easier to manage
> since it is integrated with Apache.
>
> Some have claimed that FastCGI is faster than mod_ruby, can anyone
> validate these claims? Because I can hardly believe that CGI is faster
> than the embedded interpreter.

mod_ruby uses one interpreter per Apache process, which means that apps
walk all over each other in the namespaces. At least for Rails, that's
not acceptable, so it's 1 app per Apache setup if you want mod_ruby.

FCGI is a much better setup for Rails. You don't fill up a ton of
Apache processes with your app (so apache processes serving static
files and images stay small) and you can have as many apps per apache
setup as you'd like.

I've found FCGI to be 10-15% faster in my tests with Rails.
--
David Heinemeier Hansson,
http://www.basec... -- Web-based Project Management
http://www.rubyon... -- Web-application framework for Ruby
http://macro... -- TextMate: Code and markup editor (OS X)
http://www.loudthi... -- Broadcasting Brain



James Britt

1/12/2005 2:50:00 AM

0

Sarah Tanembaum wrote:
> Using the mod_ruby gives web application more bags of tools that comes
> with Apache, just like the mod_php. And also, it is easier to manage
> since it is integrated with Apache.
>
> Some have claimed that FastCGI is faster than mod_ruby, can anyone
> validate these claims? Because I can hardly believe that CGI is faster
> than the embedded interpreter.

I believe this is because FastCGI keeps one or more Ruby interpreters in
memory, rather than creating a new process on each Web request.

Bear in mind that with mod_ruby, all Web applications are sharing the
same interpreter, and the same object space.

James


Aquila

1/12/2005 12:39:00 PM

0

Aquila wrote:

> Is there a place where I can find information on using mod_ruby? A single
> stupid example will do, I just can't find anything...

Doesn't anyone use mod_ruby then? Does everyone use Rails? There must be
some example lying around somewhere...

Thanks for your help and ruby!
--
"May the source be with you"

Jeffrey Dik

1/12/2005 5:43:00 PM

0

On Wed, Jan 12, 2005 at 09:41:17PM +0900, Aquila wrote:
> Aquila wrote:
>
> > Is there a place where I can find information on using mod_ruby? A single
> > stupid example will do, I just can't find anything...
>
> Doesn't anyone use mod_ruby then? Does everyone use Rails? There must be
> some example lying around somewhere...

There's mod_ruby examples on:
http://www.modruby.net/e...
but perhaps
http://sean.chittenden.org/programming/ruby/mod_ruby/apachecon-2002/mod_ruby_...
would be more useful.

I have been using rails with mod_ruby, but have been getting some
transient errors. I just switched to using mod_fastcgi, and so far it
seems to be both faster and error-free.

HTH,
Jeff
>
> Thanks for your help and ruby!
> --
> "May the source be with you"
>
>


David Garamond

1/13/2005 11:30:00 AM

0

Aquila wrote:
>>Is there a place where I can find information on using mod_ruby? A single
>>stupid example will do, I just can't find anything...
>
> Doesn't anyone use mod_ruby then? Does everyone use Rails? There must be
> some example lying around somewhere...

mod_ruby doesn't have to be used to create a webapp, you know :-) I use
mod_ruby to customize & extend Apache behaviour (e.g. custom URL
mapping, URL filtering, and flexible wrapped CGI execution). It's so
much easier and faster using Ruby to create Apache modules instead of C.

Oh and I use plain Ruby CGI and FastCGI too.

--
dave


Aquila

1/13/2005 12:25:00 PM

0

David Garamond wrote:

> mod_ruby doesn't have to be used to create a webapp, you know :-)

I don't understand it, you need some sort of layer on top of apache to use
server sided scripting with apache, and if you don't you can use webrick or
some other stand alone http server, right?

> I use
> mod_ruby to customize & extend Apache behaviour (e.g. custom URL
> mapping, URL filtering, and flexible wrapped CGI execution). It's so
> much easier and faster using Ruby to create Apache modules instead of C.
>
You are writing your own mod_filtering etc? That sounds really interesting.
Can I find your code somewhere?

> Oh and I use plain Ruby CGI and FastCGI too.
By plain Ruby CGI you mean Ruby on top of "regular" Apache CGI?
To end a message from a confused person: I do understand what you mean by
FastCGI...

Thanks for the information!
--
"May the source be with you"