RailsPlayground
Troubleshoot Common Rails Deployment and Setup issues
The following are the most common reasons why your application may not be running in our environment using FastCGI.
- Verify your /public directory has the permissions of 755
- Verify your /public/dispatch.fcgi or /public/dispatch.cgi if using CGI mode, file has the permissions of 755
- Verify the shebang line (first line) of the dispatch.fcgi is set to
#!/usr/local/bin/ruby . If that doesn’t work, try #!/usr/bin/env ruby
- Verify you have the correct database name and database password in your /config/database.yml
- Verify that you have enabled production mode in your environment.rb file by un -commenting this line:
ENV['RAILS_ENV'] ||= 'production'
- Verify that the RAILS_GEM_VERSION in the environment.rb is set to a version of Rails that is installed on your server.
- Verify that any needed gems for your application are installed, if your server is missing a gem, simply email support and they will install the gem for you.
- Verify that you are not using any puts statements in your code as this causes problems with Apache.
- Try changing to your /public directory and run ./dispatch.cgi and see if it returns any coding errors with your environment. (actually best to run REQUEST_METHOD=GET ./dispatch.fcgi or REQUEST_METHOD=GET ./dispatch.cgi as this will simulate a browser request)
- Check your /log/production.log or development.log for any coding error messages.
- If displaying the contents of dispatch.fcgi
change AddHandler fastcgi-script .fcgi
to:
AddHandler fcgid-script .fcgi
in .htaccess
Please Also see: How To use FastCGI and How To Use Rails at RailsPlayground
Revised on April 23, 2008 14:18:16
by
Spike THE DONG FATHER?
(41.177.24.98)
(1634 characters / 0.0 pages)