cj.miyake
By:
cj.miyake

Rails silent 500 error

December 16, 2013 3k views
I started up a new rails project just to follow the tutorial posted on https://coderwall.com/p/yz8cha Everything went well, capistrano deploy cold and updates are running fine (at least with no errors), however when I go to my site it displays a rails 500 error. Just to make sure I'm understanding it correctly if it displays the rails 500 error than the problem isn't with unicorn or nginx correct? The frustrating part is that when i check the production.log it is blank...unicorn blank as well. When i run rake db:migrate in the rails root it throws an error that no database adapter is specified... here is my database.yml file: development: adapter: postgresql username: *** password: *** database: stimuliproject_development host: localhost test: adapter: postgresql username: *** password: *** database: stimuliproject_test host: localhost production: adapter: postgresql username: *** password: *** database: stimuliproject_production host: localhost Anyone know where to look or check?
3 Answers
Check the unicorn.log file. Does it contain any errors?
I, [2013-12-12T19:45:54.866116 #15914] INFO -- : listening on addr=/tmp/unicorn.projectname.sock fd=10
I, [2013-12-12T19:45:54.866641 #15914] INFO -- : worker=0 spawning...
I, [2013-12-12T19:45:54.868026 #15914] INFO -- : worker=1 spawning...
I, [2013-12-12T19:45:54.870411 #15914] INFO -- : master process ready
I, [2013-12-12T19:45:54.869321 #15917] INFO -- : worker=0 spawned pid=15917
I, [2013-12-12T19:45:54.885785 #15917] INFO -- : Refreshing Gem list
I, [2013-12-12T19:45:54.894825 #15920] INFO -- : worker=1 spawned pid=15920
I, [2013-12-12T19:45:54.895155 #15920] INFO -- : Refreshing Gem list
I, [2013-12-12T19:45:59.307398 #15920] INFO -- : worker=1 ready
I, [2013-12-12T19:45:59.311137 #15917] INFO -- : worker=0 ready
I, [2013-12-12T19:55:11.546481 #15914] INFO -- : reaped # worker=0
I, [2013-12-12T19:55:11.546678 #15914] INFO -- : reaped # worker=1
I, [2013-12-12T19:55:11.546869 #15914] INFO -- : master complete
I, [2013-12-12T20:39:35.193060 #4593] INFO -- : listening on addr=/tmp/unicorn.projectname.sock fd=10
I, [2013-12-12T20:39:35.198043 #4593] INFO -- : worker=0 spawning...
I, [2013-12-12T20:39:35.199220 #4593] INFO -- : worker=1 spawning...
I, [2013-12-12T20:39:35.202869 #4596] INFO -- : worker=0 spawned pid=4596
I, [2013-12-12T20:39:35.203244 #4596] INFO -- : Refreshing Gem list
I, [2013-12-12T20:39:35.206691 #4593] INFO -- : master process ready
I, [2013-12-12T20:39:35.215129 #4599] INFO -- : worker=1 spawned pid=4599
I, [2013-12-12T20:39:35.215464 #4599] INFO -- : Refreshing Gem list
I, [2013-12-12T20:39:39.493255 #4596] INFO -- : worker=0 ready
I, [2013-12-12T20:39:39.499280 #4599] INFO -- : worker=1 ready
I, [2013-12-12T20:49:37.653138 #4593] INFO -- : reloading config_file=/home/cjiro/apps/stimuliproject/current/config/unicorn.rb
I, [2013-12-12T20:49:37.677980 #4593] INFO -- : done reloading config_file=/home/cjiro/apps/stimuliproject/current/config/unicorn.rb
I, [2013-12-12T20:49:37.749748 #4593] INFO -- : reaped # worker=1
I, [2013-12-12T20:49:37.749974 #4593] INFO -- : worker=1 spawning...
I, [2013-12-12T20:49:37.751175 #4593] INFO -- : reaped # worker=0
I, [2013-12-12T20:49:37.751528 #4593] INFO -- : worker=0 spawning...
I, [2013-12-12T20:49:37.754598 #9095] INFO -- : worker=0 spawned pid=9095
I, [2013-12-12T20:49:37.754984 #9095] INFO -- : Refreshing Gem list
I, [2013-12-12T20:49:37.753277 #9093] INFO -- : worker=1 spawned pid=9093
I, [2013-12-12T20:49:37.757700 #9093] INFO -- : Refreshing Gem list
I, [2013-12-12T20:49:42.792908 #9095] INFO -- : worker=0 ready
I, [2013-12-12T20:49:42.802600 #9093] INFO -- : worker=1 ready
I, [2013-12-13T10:00:56.718753 #4593] INFO -- : done reloading config_file=/home/cjiro/apps/stimuliproject/current/config/unicorn.rb
I, [2013-12-13T10:00:56.804477 #4593] INFO -- : reaped # worker=0
I, [2013-12-13T10:00:56.804680 #4593] INFO -- : worker=0 spawning...
I, [2013-12-13T10:00:56.810620 #13665] INFO -- : worker=0 spawned pid=13665
I, [2013-12-13T10:00:56.811009 #13665] INFO -- : Refreshing Gem list
I, [2013-12-13T10:00:56.815415 #4593] INFO -- : reaped # worker=1
I, [2013-12-13T10:00:56.815646 #4593] INFO -- : worker=1 spawning...
I, [2013-12-13T10:00:56.817322 #13668] INFO -- : worker=1 spawned pid=13668
I, [2013-12-13T10:00:56.821297 #13668] INFO -- : Refreshing Gem list
I, [2013-12-13T10:01:02.112870 #13668] INFO -- : worker=1 ready
I, [2013-12-13T10:01:02.114201 #13665] INFO -- : worker=0 ready
Please pastebin unicorn's config.
Have another answer? Share your knowledge.