List Info

Thread: Working with SCGI




Working with SCGI
user name
2006-04-24 06:12:41
Hi folks,

As the "Rolling with Ruby on Instant Rails"
tutorial freely admits, it
uses Webrick for simplicity and doesn't bother with Apache.

Where, then, can I get some instructions on getting a new
Rails app
working with Apache and SCGI using InstantRails?  I didn't
see any in
the Wiki.

I followed the steps in InstantRails > Manage Rails
Applications >
Configure SCGI Settings, which I summarise as follows:

 - choose an SCGI port (I chose 9997)
 - edit the Apache config file, using the cookbook and typo
virtual
servers as an example (my server name is www.cclocal.com)
 - edit the Windows host file
 - check to see that config/scgi.yaml has been written
 - restart Apache (just in case it wasn't automatically
restarted)
 - hit the "Start SCGI server" button

That last step launches a DOS box with title
"E:\INSTAN~1\ruby\bin\ruby.exe" but with no
output in it.

When I point my browser at www.cclocal.com, what do I see? 
Title:
"Instant Rails Help"; content: "coming
soon!".  Not what I wanted!

The relevant bits of config are below.  Can anyone see
anything wrong
with it and/or offer some advice?

Thanks,
Gavin

=== config/scgi.yaml
---
:host: 127.0.0.1
:password: doruedQ6MyR7o
:port: 9997
:control_url: druby://127.0.0.1:8997
:env: development
:logfile: log/scgi.log
:disable_signals: true
:config: config/scgi.yaml


=== httpd.conf (excerpt)
<VirtualHost *>
    ServerName www.cclocal.com
    # handle all requests through SCGI
    SCGIMount /dispatch.fcgi 127.0.0.1:9997
    DocumentRoot
E:/InstantRails/rails_apps/CrapCollector/public
    <Directory
E:/InstantRails/rails_apps/CrapCollector/public>
        Options +FollowSymLinks
        Order allow,deny
        allow from all
    </Directory>
    AddDefaultCharset utf-8
    ErrorDocument 500 /500.html
    ErrorDocument 404 /404.html
</VirtualHost>

=== hosts (excerpt)
127.0.0.1       www.cclocal.com

_______________________________________________
Instantrails-users mailing list
Instantrails-usersrubyforge.org
http://rubyforge.org/mailman/listinfo/instantrails-users

Working with SCGI
user name
2006-04-24 14:15:05
WEBrick is still best for development. Transitioning to Apache is good when you are moving closer to production deployment and you want to develop in an environment that is similar to the eventual production environment.

Your setup look good to me (I just skimmed it quickly). You could try it with an empty (blank) password, temporarily, just to make sure there isn't some sort of problem there.

I'm going to be in meetings all day today, so hopefully someone else can help out if you're unable to figure it out.

Curt

On 4/24/06, Gavin Sinclair <gmail.com">gsinclairgmail.com> wrote:
Hi folks,

As the "Rolling with Ruby on Instant Rails"; tutorial freely admits, it
uses Webrick for simplicity and doesn't bother with Apache.

Where, then, can I get some instructions on getting a new Rails app
working with Apache and SCGI using InstantRails? &nbsp;I didn't see any in
the Wiki.

I followed the steps in InstantRails > Manage Rails Applications >
Configure SCGI Settings, which I summarise as follows:

- choose an SCGI port (I chose 9997)
- edit the Apache config file, using the cookbook and typo virtual
servers as an example (my server name is www.cclocal.com)
- edit the Windows host file
- check to see that config/scgi.yaml has been written
- restart Apache (just in case it wasn't automatically restarted)
- hit the "Start SCGI server&quot; button

That last step launches a DOS box with title
&quot;E:\INSTAN~1\ruby\bin\ruby.exe&quot; but with no output in it.

When I point my browser at www.cclocal.com, what do I see?  Title:
"Instant Rails Help"; content: "coming soon!";. &nbsp;Not what I wanted!

The relevant bits of config are below.&nbsp; Can anyone see anything wrong
with it and/or offer some advice?

Thanks,
Gavin

=== config/scgi.yaml
---
:host: 127.0.0.1
:password: doruedQ6MyR7o
:port: 9997
:control_url: druby://127.0.0.1:8997
:env: development
:logfile: log/scgi.log
:disable_signals: true
:config: config/scgi.yaml


=== httpd.conf (excerpt)
<VirtualHost *>
&nbsp; &nbsp; ServerName www.cclocal.com
&nbsp; &nbsp; # handle all requests through SCGI
 ; &nbsp; SCGIMount /dispatch.fcgi 127.0.0.1:9997
&nbsp; &nbsp; DocumentRoot E:/InstantRails/rails_apps/CrapCollector/public
   ; <Directory E:/InstantRails/rails_apps/CrapCollector/public>
&nbsp; &nbsp;   ; &nbsp;Options +FollowSymLinks
 ; &nbsp; &nbsp; &nbsp; Order allow,deny
 &nbsp; &nbsp; &nbsp; &nbsp;allow from all
 ; &nbsp; <;/Directory>
   ; AddDefaultCharset utf-8
&nbsp; &nbsp; ErrorDocument 500 /500.html
  ; &nbsp;ErrorDocument 404 /404.html
</VirtualHost>

=== hosts (excerpt)
127.0.0.1  &nbsp; &nbsp; &nbsp; www.cclocal.com

_______________________________________________
Instantrails-users mailing list
rubyforge.org">Instantrails-usersrubyforge.org
http://rubyforge.org/mailman/listinfo/instantrails-users

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )