Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7084525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:18:44+00:00 2026-05-28T07:18:44+00:00

I’m setting up Ruby on Rails for the first time; on my server, I’ve

  • 0

I’m setting up Ruby on Rails for the first time; on my server, I’ve created and loaded the default rails app. I can view the default page (“Welcome aboard! You are riding Rails”), but when I go to click on the link to “View Application Environment”, it generates a 500 error.

(You can view it here.)

I’d like to know more about the error, but, the log file (“log/production.log”) is empty. Looking at my Apache log I find:

Rails Error: Unable to access log file. Please ensure that
/var/www/rails/myapp/log/production.log exists and is chmod 0666. The
log level has been raised to WARN and the output directed to STDERR
until the problem is fixed.

So, I actually want to get my Ruby on Rails error logging working.

I know this problem has been posted a few times before, but I tried everything I could find, so here’s what I have tried:

  1. Created the “log/production.log” file, set the owner to www-data, set chmod 0666.
  2. Set the owner of the “log” folder to www-data, set chmod 0666.
  3. Double-checked my production environment settings such that config.log_level = :info is set.
  4. Checked that Apache is using the www-data user (“etc/apache2/envvars”):

    export APACHE_RUN_USER=www-data
    export APACHE_RUN_GROUP=www-data
    
  5. “etc/apache2/mods-available/passenger.conf” has a default user set for Passenger:

    <IfModule mod_passenger.c>
      PassengerRoot /usr
      PassengerRuby /usr/bin/ruby
      PassengerDefaultUser www-data
    </IfModule>
    
  6. The owner of “config.ru” and “configs/environment.rb” is www-data

  7. My virtual host has been set accordingly:

    DocumentRoot /var/www/rails/myapp/public
    RackBaseURI /
    RackEnv production
    PassengerMaxPoolSize 4
    

Already read and attempted all the fixes suggested in these places:

  • Rails: Unable to access log file
  • Can't access log files in production
  • http://railsforum.com/viewtopic.php?id=36168
  • Why am I getting Permission denied error in deployment on files generated by capistrano?
  • http://bradhe.wordpress.com/2011/06/26/a-sneaky-rails-3-bug-in-logging/

(That’s all I can remember trying right now…)

Some environment settings of mine:

  • Ubuntu 11.10 running on Amazon EC2
  • Apache 2.2.20
  • RVM 1.10.2
  • Ruby 1.9.3p0
  • Rails 3.1.3
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:18:45+00:00Added an answer on May 28, 2026 at 7:18 am

    This issue is resolved now, though the the cause of the problem itself isn’t entirely clear.

    I had some weird configuration issues with Apache & Passenger (a.k.a. ModRails). Two modules existed: one that appeared to come packaged with Apache(?) and one I obtained via passenger-install-apache2-module. When I pointed to the pre-installed one, I had this logging issue. When I pointed to the one deployed by passenger-install-apache2-module, I had a completely different issue where Passenger would crash with a segfault (see my post on ServerFault here.)

    In the end, I completely wiped my server and performed a clean install of everything from the base Ubuntu AMI (running on Amazon EC2 made this easy enough.) Upon reinstalling, I ran passenger-install-apache2-module and configured Apache to load the module deployed by it. This time, the module didn’t crash, but the log error appeared. I set chmod 755 on the root of my Rails application, made sure the production.log existed and that it had at least chmod 0666 privileges. And voila, problem gone.

    TL;DR Did a fresh install, made sure I was using the latest Passenger module, and my file permissions were set properly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.