Forum: Ruby on Rails Strange Behavior on Non-Index Pages

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
c.k.lester (Guest)
on 2006-05-10 23:44
(Received via mailing list)
If I browse to \myRoRApp, I get the "Welcome aboard" screen.

I've done the ruby scripts/generate controller MyTest, and "Rolling with
Ruby on Rails" tells me I should be able to browse to \myRoRApp\MyTest
and see an error page, but what I'm actually seeing is a fastcgi config
file!

I have installed fastcgi, but apache can't "see" the module so I comment
that LoadModule line out of http.conf. Maybe it's still affecting the
RoR machinery...?

How do I get this working with fastcgi or without fastcgi? :)

Thanks!
Bryan D. (Guest)
on 2006-05-11 02:04
If you commented out the LoadModule for fastcgi, that's likely to be a
failure point. The order of lines in the config files is important, so
make sure you LoadModule fastcgi stuff before you try and make use of
the module.

But seriously, why not use Lighttpd? FCGI rails configuration is a snap,
and its faster.
C. K. Lester (Guest)
on 2006-05-11 06:59
(Received via mailing list)
Bryan D. wrote:

>If you commented out the LoadModule for fastcgi, that's likely to be a
>failure point. The order of lines in the config files is important, so
>make sure you LoadModule fastcgi stuff before you try and make use of
>the module.
>
>But seriously, why not use Lighttpd? FCGI rails configuration is a snap,
>and its faster.
>
>
I finally got all remnants of FastCGI out of the system and everything's
working fine, now. Except... IT'S AMAZINGLY SLOOOOOOW... :)

So, now I guess I'll try Lighttpd. I'm using Windows 2000. Will that be
a problem?

Thanks!!!
Bryan D. (Guest)
on 2006-05-11 17:01
Actually, yes. Lighttpd's FastCGI library is not compiled for Windows,
as I understand it. Why do you want to deploy on a Windows box? I
develop on Win2k under Webrick, but I deploy on Debian.
c.k.lester (Guest)
on 2006-05-11 17:54
(Received via mailing list)
Bryan D. wrote:

>Actually, yes. Lighttpd's FastCGI library is not compiled for Windows,
>as I understand it. Why do you want to deploy on a Windows box? I
>develop on Win2k under Webrick, but I deploy on Debian.
>
>
I'm only dev'ing under Windows. I'll probably deploy on a Linux/BSD box
(haven't chosen my provider yet). Will I get better performance on Win2K
using Webrick?
Mathias W. (Guest)
on 2006-05-11 18:03
(Received via mailing list)
On 5/11/06, c.k.lester <removed_email_address@domain.invalid> wrote:
> Bryan D. wrote:
>
> I'm only dev'ing under Windows. I'll probably deploy on a Linux/BSD box
> (haven't chosen my provider yet). Will I get better performance on Win2K
> using Webrick?
>

WEBrick isn't a performance server, but it's very very easy to get up
and running, no configuration needed, at all. It never caches stuff
either, so it's perfect for development. No real need to set up
anything more complicated for development (most of the time at least),
and if you want to performance test your application you should
probably do so on a machine as identical to the deployment environment
as possible to get some real numbers.

My two cents. :)
Mathias.
c.k.lester (Guest)
on 2006-05-11 18:06
(Received via mailing list)
Mathias W. wrote:

> On 5/11/06, c.k.lester <removed_email_address@domain.invalid> wrote:
>
>> I'm only dev'ing under Windows. I'll probably deploy on a Linux/BSD box
>> (haven't chosen my provider yet). Will I get better performance on Win2K
>> using Webrick?
>>
> WEBrick isn't a performance server, but it's very very easy to get up
> and running, no configuration needed, at all.

I've got Apache up and running sans FastCGI (or Lighttpd). Will Webrick
have equal or better performance than my current configuration (which is
dog-awful slow)?

> It never caches stuff either, so it's perfect for development.

Forgive the newbality, and just curious, but what makes a non-caching
server perfect for development?
Mathias W. (Guest)
on 2006-05-11 18:18
(Received via mailing list)
On 5/11/06, c.k.lester <removed_email_address@domain.invalid> wrote:
> Mathias W. wrote:
> > WEBrick isn't a performance server, but it's very very easy to get up
> > and running, no configuration needed, at all.
>
> I've got Apache up and running sans FastCGI (or Lighttpd). Will Webrick
> have equal or better performance than my current configuration (which is
> dog-awful slow)?

The slowness sounds to me as if something isn't working as it should,
Apache with FastCGI should be working fairly quick. (have you updated
the .htaccess to use the dispatch.fcgi file instead of the
dispatch.cgi one?) WEBrick is the slowest server you could pick and
probably won't handle traffic too well if you ran it on a live system,
but in my experience it's pretty snappy for the single requests I do
while developing (I got no big projects yet, but it always gives me a
result well under a second so far).

> > It never caches stuff either, so it's perfect for development.
>
> Forgive the newbality, and just curious, but what makes a non-caching
> server perfect for development?

If the server would cache your stuff you might not see the effects of
your changes at first refresh, which would be kinda annoying as you
change your code, wouldn't it? :)

I'm no expert either, so I might get some details wrong, but overall
if you want a webserver that's easy to get running, try WEBrick and
upgrade to something with better performance once you suffer from
WEBrick's lack of performance. :) It's not a problem until it's a
problem. ;)

Mathias.
Alex Y. (Guest)
on 2006-05-11 18:25
(Received via mailing list)
c.k.lester wrote:
> Mathias W. wrote:
>
>> On 5/11/06, c.k.lester <removed_email_address@domain.invalid> wrote:
<snip>
>> WEBrick isn't a performance server, but it's very very easy to get up
>> and running, no configuration needed, at all.
>
>
> I've got Apache up and running sans FastCGI (or Lighttpd). Will Webrick
> have equal or better performance than my current configuration (which is
> dog-awful slow)?
It sounds to me like you've got it running in CGI mode.  That's known to
be the slowest method around.  WEBrick will be faster.

>> It never caches stuff either, so it's perfect for development.
>
> Forgive the newbality, and just curious, but what makes a non-caching
> server perfect for development?
One less confounding factor to confuse things.
Bryan D. (Guest)
on 2006-05-11 18:26
The whole idea of WEBrick is that it is fast for development. By no
means should you deploy with it.

Apache or Lighttpd is not for development. As you said, how you deploy
will be largely determined by your hosting provider.
c.k.lester (Guest)
on 2006-05-11 18:28
(Received via mailing list)
Mathias W. wrote:

> On 5/11/06, c.k.lester <removed_email_address@domain.invalid> wrote:
>
>> I've got Apache up and running sans FastCGI (or Lighttpd). Will Webrick
>> have equal or better performance than my current configuration (which is
>> dog-awful slow)?
>
> The slowness sounds to me as if something isn't working as it should,
> Apache with FastCGI should be working fairly quick. (have you updated
> the .htaccess to use the dispatch.fcgi file instead of the
> dispatch.cgi one?)

Oh, well there's the misunderstanding... I don't have FastCGI working. I
installed it and tried to get it to work, but apache griped on start-up
about not being able to find the module mod_fastcgi.dll... when I know
darn well it's right there!!! :)

So, with FastCGI off, Apache is slow.

> [Webrick is] pretty snappy for the single requests I do
> while developing (I got no big projects yet, but it always gives me a
> result well under a second so far).

Well, that's a bit faster than Apache on my system, but you're probably
dev'ing on a dual-core 64-bit chip, right?! :P

> If the server would cache your stuff you might not see the effects of
> your changes at first refresh, which would be kinda annoying as you
> change your code, wouldn't it? :)

Yep. :)

Thanks! :)
c.k.lester (Guest)
on 2006-05-11 18:32
(Received via mailing list)
Alex Y. wrote:

> It sounds to me like you've got it running in CGI mode.  That's known
> to be the slowest method around. WEBrick will be faster.

Bryan D. wrote:

>The whole idea of WEBrick is that it is fast for development. By no
>means should you deploy with it.
>
Then I guess I should run with WEBrick...

Thanks for the help, people!
Mathias W. (Guest)
on 2006-05-11 18:38
(Received via mailing list)
On 5/11/06, c.k.lester <removed_email_address@domain.invalid> wrote:
> Well, that's a bit faster than Apache on my system, but you're probably
> dev'ing on a dual-core 64-bit chip, right?! :P

How did you know? :D *runs spyware scanner* ;)

Good luck with your continued development. ;)

Mathias.
This topic is locked and can not be replied to.