Rails Deployment in Win32 Best Practices: Lighty + Sgci

I have received very good guidance from the users of this site and I think some advanced Rails users could help me with the next problem.

I am trying to deploy a simple Rails application on a win32 server.

I worked carefully with these instructions (see http://functionalelegant.blogspot.com/2008/05/deploying-rails-on-windows.html ) to deploy win32 Rails applications.

I started with a cleaner or cleaner Windows cleanup then downloaded and installed

  • ruby
  • LightTPD
  • Rails
  • Zed SCGI Rails Runner
  • Windows Server 2003 Resource Kit Tools
  • Ruby / DBI ADO Package

After that I did the following:

I commented out the line in the SCGI gem (which was actually causing the problems).

I created a directory structure as suggested with folders for the logs.

I modified the scgi.yaml file and Lighty config files to reflect my environment settings.

After that, I wrote batch scripts to get Lighty and the SGCI process up and running. They seem to be working correctly. However, the following lines appear inside app-errors.log:

2009-05-15 16:48:06: (mod_scgi.c.2645) fcgi: got a FDEVENT_ERR. Don't know why. 
2009-05-15 16:48:06: (mod_scgi.c.2469) emergency exit: scgi: connection-fd: 7 fcgi-fd: 8 

      


Finally, when I go to http: // localhost: xxxx / , I just see a blank page. Update . I realized that only a blank page appeared. Viewing the source revealed the following issue:

2C:/Ruby/lib/ruby/1.8/drb/drb.rb:573:in `load'":C:/Ruby/lib/ruby/1.8/drb/drb.rb:612:in `recv_request'":C:/Ruby/lib/ruby/1.8/drb/drb.rb:911:in `recv_request'"?C:/Ruby/lib/ruby/1.8/drb/drb.rb:1530:in `init_with_client'"<C:/Ruby/lib/ruby/1.8/drb/drb.rb:1542:in `setup_message'"6C:/Ruby/lib/ruby/1.8/drb/drb.rb:1494:in `perform'"8C:/Ruby/lib/ruby/1.8/drb/drb.rb:1589:in `main_loop'"3C:/Ruby/lib/ruby/1.8/drb/drb.rb:1585:in `loop'"8C:/Ruby/lib/ruby/1.8/drb/drb.rb:1585:in `main_loop'"4C:/Ruby/lib/ruby/1.8/drb/drb.rb:1581:in `start'"8C:/Ruby/lib/ruby/1.8/drb/drb.rb:1581:in `main_loop'"2C:/Ruby/lib/ruby/1.8/drb/drb.rb:1430:in `run'"4C:/Ruby/lib/ruby/1.8/drb/drb.rb:1427:in `start'"2C:/Ruby/lib/ruby/1.8/drb/drb.rb:1427:in `run'"9C:/Ruby/lib/ruby/1.8/drb/drb.rb:1347:in `initialize'"2C:/Ruby/lib/ruby/1.8/drb/drb.rb:1627:in `new'"<C:/Ruby/lib/ruby/1.8/drb/drb.rb:1627:in `start_service'"MC:/Ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:402:in `run'"HC:/Ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/bin/scgi_service:61"*C:/Ruby/bin/scgi_service:19:in `load'" C:/Ruby/bin/scgi_service:19:   mesg" too large packet

      

Note that "ruby script / server" works fine, but the page cannot be seen from outside.

Any ideas? Please let me know if something pops up at you.

0


a source to share


1 answer


I wrote this chapter under "Deploying Rails Applications". http://www.pragprog.com/titles/fr_deploy/deploying-rails-applications

Basically you want mongrel, mongrel_service and apache 2.2 with mod_proxy_balancer for windows.

You install 2 or more instances of your application with Mongrel running on separate ports. You are installing autorun services.



Then you will configure apache to balance with them.

It's all outlined in the book, and I also have some old articles on my website - if you're looking for "delinging rails on windows" you will find some pretty dated stuff. The apache + mongrel way is the best way for Windows right now and if you need more help feel free to let me know. I would be glad to help.

+3


a source







All Articles