views:

221

answers:

2

This app works just fine on my local computer. After pushing it to Heroku, static pages appear to be working but the blog section throws an Internal Server Error. I pulled the logs by running "heroku logs" and this is what I get:

==> production.log <==
 /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
 /home/slugs/215194_e5b887e_c999/mnt/.bundle/gems/gems/thin-1.2.7/lib/thin/backends/base.rb:57:in `start'
 /home/slugs/215194_e5b887e_c999/mnt/.bundle/gems/gems/thin-1.2.7/lib/thin/server.rb:156:in `start'
 /home/slugs/215194_e5b887e_c999/mnt/.bundle/gems/gems/thin-1.2.7/lib/thin/controllers/controller.rb:80:in `start'
 /home/slugs/215194_e5b887e_c999/mnt/.bundle/gems/gems/thin-1.2.7/lib/thin/runner.rb:177:in `send'
 /home/slugs/215194_e5b887e_c999/mnt/.bundle/gems/gems/thin-1.2.7/lib/thin/runner.rb:177:in `run_command'
 /home/slugs/215194_e5b887e_c999/mnt/.bundle/gems/gems/thin-1.2.7/lib/thin/runner.rb:143:in `run!'
 /home/slugs/215194_e5b887e_c999/mnt/.bundle/gems/gems/thin-1.2.7/bin/thin:6

Something wrong with the eventmachine gem, I suppose....but it works fine on my machine. So I'm not sure what's going on or how to debug it.

+1  A: 

I'm not sure how heroku handles things, but the trace/logs seem to say you might not have migrated your database. Is this the case?

thomasfedb
I'm going to take a stab that this is the problem. Did you `heroku rake db:migrate`?
ghoppe
That would do it.
thomasfedb
+2  A: 

From your error log, it looks like you are somehow trying to access a database with SQLite3. Heroku's uses Postgresql though, so clearly your database will fail to open. Heroku generates automatically the database.yml file, so the error is can't be there but maybe you are requiring and using sqlite3 directly?

Marc-André Lafortune
my thoughts exactly. :)
Rishav Rastogi
Also, heroku doesn't let you do file operations, so that is another reason why sqlite3 will fail to work.
BaroqueBobcat