I have an application completed that was built with RoR on windows. So
this of course was tested with the webbrick server. I now want to put
the project on our apache web server for production. I am having a very
hard time getting this accomplished. I followed some of the steps here
(because not all of them worked):
And I have managed to get ruby, rails, fcgi, and mod_fcgi all installed
and working. I even have a test fcgi script that runs fine. However,
I'm just not sure how to reference the project once it is on the server.
With webbrick you just say localhost:3000/project_name. But we can't
say http://192.168.X.X/project_name on the apache web server because
there is no index document. I can hit
http://192.168.X.X/project_name/public but when I click on about your
applications environment I get this ugly output:
#!/usr/bin/ruby # # You may specify the path to the FastCGI crash log (a
log of unhandled # exceptions which forced the FastCGI instance to exit,
great for debugging) # and the number of requests to process before
running garbage collection. # # By default, the FastCGI crash log is
RAILS_ROOT/log/fastcgi.crash.log # and the GC period is nil (turned
off). A reasonable number of requests # could range from 10-100
depending on the memory footprint of your app. # # Example: # # Default
log path, normal GC behavior. # RailsFCGIHandler.process! # # # Default
log path, 50 requests between GC. # RailsFCGIHandler.process! nil, 50 #
# # Custom log path, normal GC behavior. # RailsFCGIHandler.process!
'/var/log/myapp_fcgi_crash.log' # require File.dirname(__FILE__) +
"/../config/environment" require 'fcgi_handler'
All of the tutorials that I find seem to say the same stuff, has anyone
set this up before that could help?
Last time I tried to set up Apache + FastCGI + Rails on SuSE, it didn't work out so hot. Apache 2.2 is the default Apache version, and I couldn't get mod_fcgi and FastCGI installed and compiled happily. The situation may have changed, and someone who actually knows what they are doing could probably get it to work, but I ended up using fcgid, and that's been fine.
If you want details about what I tried or have running now, let me know.
My advice to you -- though, I haven't done this on SuSE -- is to go with mongrel. It's much easier to set up and works great. You'll also need something like pound out in front on a production site.