Patrick Aljord
2006-Nov-13 23:17 UTC
[Mongrel] Service Temporarily Unavailable when using apache
hey all, I''m trying to do a mongrel_cluster+apache2 config. this is my testapp.conf: <VirtualHost *:80> Include /etc/apache2/conf.d/testapp.common # ErrorLog logs/testapp_errors_log # CustomLog logs/testapp_log combined </VirtualHost> this is my testapp.common: ServerName myapp.com DocumentRoot /home/patcito/testapp/public/ <Directory "/home/patcito/testapp/public/"> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> RewriteEngine On # Make sure people go to www.myapp.com, not myapp.com RewriteCond %{HTTP_HOST} ^myapp.com$ [NC] RewriteRule ^(.*)$ http://www.myapp.com$1 [R=301,L] # Yes, I''ve read no-www.com, but my site already has much Google-Fu on # www.blah.com. Feel free to comment this out. # Uncomment for rewrite debugging #RewriteLog logs/myapp_rewrite_log #RewriteLogLevel 9 # Check for maintenance file and redirect all requests RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f RewriteCond %{SCRIPT_FILENAME} !maintenance.html RewriteRule ^.*$ /system/maintenance.html [L] # Rewrite index to check for static RewriteRule ^/$ /index.html [QSA] # Rewrite to check for Rails cached page RewriteRule ^([^.]+)$ $1.html [QSA] # Redirect all non-static requests to cluster RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L] and this is my testapp.proxy_cluster.conf: <Proxy balancer://mongrel_cluster> BalancerMember http://127.0.0.1:8000 BalancerMember http://127.0.0.1:8001 BalancerMember http://127.0.0.1:8002 </Proxy> now when I start my mongrel_cluster I get the index page but I get a Service Temporarily Unavailable when I click on the pink box to check my environment. Looking at my mongrel log I get that: /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'': no such file to load -- /etc/mongrel_cluster/config/environment (LoadError) this is what my testapp.yml contains: --- log_file: /home/patcito/testapp/log/mongrel.log port: "8000" environment: development address: xx.yy.zz.tt pid_file: /home/patcito/testapp/log/mongrel.pid servers: 3 docroot: /home/patcito/testapp/public any idea what I did wrong? thanx in advance Pat
Wayne E. Seguin
2006-Nov-22 13:29 UTC
[Mongrel] Service Temporarily Unavailable when using apache
Pat, To me this says that you''re missing a gem that is being required in your environment files. Try running "mongrel_rails start" from the rails root on the server alone and if it crashes with this message then this is most likely the case. ~Wayne On Nov 13, 2006, at 18:17 , Patrick Aljord wrote:> /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require'': no such file to load -- > /etc/mongrel_cluster/config/environment (LoadError)