JezK
Edit File: rails.txt
=== Ruby on Rails-specific troubleshooting ==== The "About your application's environment" link does not work ifdef::apache[] This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/apache/troubleshooting/ruby/#the-about-your-application-s-environment-link-does-not-work endif::[] ifdef::nginx[] This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/nginx/troubleshooting/ruby/#the-about-your-application-s-environment-link-does-not-work endif::[] ifdef::standalone[] This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/standalone/troubleshooting/ruby/#the-about-your-application-s-environment-link-does-not-work endif::[] ==== The Rails application reports that it's unable to start because of a permission error ifdef::apache[] This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/apache/troubleshooting/ruby/#the-rails-application-reports-that-it-s-unable-to-start-because-of-a-permission-error endif::[] ifdef::nginx[] This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/nginx/troubleshooting/ruby/#the-rails-application-reports-that-it-s-unable-to-start-because-of-a-permission-error endif::[] ifdef::standalone[] This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/standalone/troubleshooting/ruby/#the-rails-application-reports-that-it-s-unable-to-start-because-of-a-permission-error endif::[] ==== The Rails application's log file is not being written to There are a couple things that you should be aware of: - By default, Phusion Passenger runs Rails applications in 'production' mode, so please be sure to check `production.log` instead of `development.log`. + See ifdef::apache[] <<RailsEnv,RailsEnv>> endif::[] ifdef::nginx[] <<RailsEnv,rails_env>> endif::[] for configuration. - By default, Phusion Passenger runs Rails applications as the owner of `config.ru`. So the log file can only be written to if that user has write permission to the log file. Please `chmod` or `chown` your log file accordingly. + See <<User_switching,User switching (security)>> for details. If you're using a RedHat-derived Linux distribution (such as Fedora or CentOS) then it is link:http://code.google.com/p/phusion-passenger/issues/detail?id=4[possible that SELinux is interfering]. RedHat's SELinux policy only allows Apache to read/write directories that have the 'httpd_sys_content_t' security context. Please run the following command to give your Rails application folder that context: ----------------------------------------------------------- chcon -R -h -t httpd_sys_content_t /path/to/your/rails/app -----------------------------------------------------------