Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
App crashes because log/production.log doesn't exist #4
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.
When I deploy the app, I get (among other things)...
But, the application crashes. The logs show this (Cleaning the date and stuff to make it more readable):
I think this happens because the rails server command is not started with the
So it loads this:
Causing the problem in Line 8 (I think).
I run into the same issue when migrating an application from bamboo to cedar. I had these two lines in my production.rb:
config.logger = Logger.new(STDOUT) # required for logging to work in rake tasks
Removing them fixed the boot problem.
Any suggestion on what to do if I do want to see more detail logs? Some post on stackoverflow suggest to add code similar to these two lines to production.rb
@nhocki can you please give a more detailed explanation of what you needed to modify in your
I started receiving this problem after pushing an app to Heroku's cedar stack, and following the instructions here to use
When I did that and tried to push to Heroku, my app crashed. Upon examining the log for the application I saw the same errors people are mentioning above here:
After trying a silly solution that didn't work (creating a file named
And sure enough it started working. Hopefully this helps someone else!
You could also change your
For what its worth (to future visitors) I had this same issue but was running Webrick. I included a Profile to use Thin and then deployed. I still had the same error. I removed the Profile and then redeployed and then the error magically went away. Not sure WHY this is happening. Very odd.