Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I ran into the same issue with my ubuntu 10.x server. Here's what I learned while troubleshooting.</p> <ul> <li>As mentioned previously and in the docs, Passenger runs the rails ruby processes as the owner of the config/environment.rb file. Unless you have done something special, this is typically the same as the owner of your entire rails application directory. In the case of a capistrano deployment, this is the capistrano user.</li> <li>If environment.rb is owned by root (most likely because you are deploying as root) passenger runs the rails processes as 'nobody'</li> </ul> <p>You can see which user the processes are run as via the top command (or any number of other techniques).</p> <p>In either case -- mine happend to be the latter -- if the rails processes cannot write to the log files, nothing shows up in the logs (duh). Rails will ignore this permission denied error and try to process the requests as normally. </p> <p>The solution is to ensure that the rails ruby processes are running as the same user that owns your rails deployment, config/environment.rb file and the logs directory and files.</p> <p>This can be either deplyment configuration step to chown the files and directories in question or configuring apache and telling it to run the ruby process as a specific user (say, root instead of nobody). Running as root is obviously not recommended, but if you are doing that for whatever reasons, and need to see rails logs properly written to, you can do this by adding the following</p> <pre><code># in /etc/apache2/apache2.conf PassengerDefaultUser root </code></pre> <p>If you are not deploying as root (which is the case on another server I have), the typical scenario should be that the rails app directory is owned by that non-root-user, and passenger should run the rails processes as that same user. And everything should just work.</p> <p>[1] <a href="http://www.modrails.com/documentation/Users%20guide%20Apache.html#_the_rails_application_reports_that_it_8217_s_unable_to_start_because_of_a_permission_error" rel="nofollow">http://www.modrails.com/documentation/Users%20guide%20Apache.html#_the_rails_application_reports_that_it_8217_s_unable_to_start_because_of_a_permission_error</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload