{"comment":{"created_at":"2011-10-25T04:10:58Z","body":"I run into the same issue when migrating an application from bamboo to cedar. I had these two lines in my production.rb:\r\n\r\n  config.logger = Logger.new(STDOUT) # required for logging to work in rake tasks\r\n  config.logger.level = Logger::INFO # required to stop debug logging on production\r\n\r\nRemoving them fixed the boot problem.","updated_at":"2011-10-25T04:10:58Z","url":"https://api.github.com/repos/ddollar/rails_log_stdout/issues/comments/2512778","id":2512778,"user":{"avatar_url":"https://secure.gravatar.com/avatar/f52276f8d9db1d7c6577deb16eef9e0c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"f52276f8d9db1d7c6577deb16eef9e0c","url":"https://api.github.com/users/rtekie","id":418318,"login":"rtekie"}},"action":"created","issue":{"number":4,"created_at":"2011-09-25T20:22:40Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"I understand that Heroku uses this plugin to make the log go to STDOUT and not to a file. The problem is that this is crashing the app on boot.\r\n\r\nWhen I deploy the app, I get (among other things)...\r\n\r\n```\r\n-----> Writing config/database.yml to read from DATABASE_URL\r\n-----> Rails plugin injection\r\n       Injecting rails_log_stdout\r\n       Injecting rails3_serve_static_assets\r\n-----> Preparing app for Rails asset pipeline\r\n       Detected manifest.yml, assuming assets were compiled locally\r\n\r\n```\r\n\r\nBut, the application crashes. The logs show this (Cleaning the date and stuff to make it more readable):\r\n\r\n```\r\n State changed from crashed to created\r\n State changed from created to starting\r\n Slug compilation finished\r\n Starting process with command `bundle exec rails server -p 44487`\r\n => Booting WEBrick\r\n => Rails 3.1.0 application starting in production on http://0.0.0.0:44487\r\n => Call with -d to detach\r\n => Ctrl-C to shutdown server\r\n /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.0/lib/rails/rack/log_tailer.rb:8:in `size': No such file or directory - log/production.log (Errno::ENOENT)\r\n    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.0/lib/rails/rack/log_tailer.rb:8:in `initialize'\r\n    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.3/lib/rack/server.rb:295:in `new'\r\n    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.3/lib/rack/server.rb:295:in `block in build_app'\r\n    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.3/lib/rack/server.rb:291:in `reverse_each'\r\n    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.3/lib/rack/server.rb:291:in `build_app'\r\n    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.3/lib/rack/server.rb:301:in `wrapped_app'\r\n    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.3/lib/rack/server.rb:252:in `start'\r\n    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.0/lib/rails/commands/server.rb:70:in `start'\r\n    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.0/lib/rails/commands.rb:54:in `block in <top (required)>'\r\n    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.0/lib/rails/commands.rb:49:in `tap'\r\n    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.0/lib/rails/commands.rb:49:in `<top (required)>'\r\n    from script/rails:6:in `require'\r\n    from script/rails:6:in `<main>'\r\n    2011-09-25T20:16:05+00:00 heroku[web.1]: Process exited\r\n\r\n```\r\n\r\nI think this happens because the rails server command is not started with the `daemonize` option:\r\n\r\nhttps://github.com/rails/rails/blob/master/railties/lib/rails/commands/server.rb#L79\r\n\r\nSo it loads this:\r\n\r\nhttps://github.com/rails/rails/blob/master/railties/lib/rails/rack/log_tailer.rb#L8\r\n\r\nCausing the problem in Line 8 (I think).\r\n\r\nAny help?\r\n\r\nThanks","comments":4,"title":"App crashes because log/production.log doesn't exist","updated_at":"2011-10-25T04:10:58Z","url":"https://api.github.com/repos/ddollar/rails_log_stdout/issues/4","id":1734976,"assignee":null,"milestone":null,"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/4dc7bd4eef74839f5331c580fa88fd1f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"4dc7bd4eef74839f5331c580fa88fd1f","url":"https://api.github.com/users/nhocki","id":17035,"login":"nhocki"},"html_url":"https://github.com/ddollar/rails_log_stdout/issues/4","labels":[],"state":"open"},"legacy":{"issue_id":1734976,"comment_id":2512778}}