简体   繁体   中英

Trouble deploying to Heroku — logs included

I'm running a Rails 3.09 Ruby 1.92 App on Bamboo stack on Heroku. The app works just fine in production mode running locally without problems. I'm trying to diagnose why the app won't run on Heroku. I'm getting a 500 Error Miscellaneous Server Error. Has anyone seen something like what's in the logs before?

This is my logs...

https://gist.github.com/2655795

Update: here's the updated log: https://gist.github.com/2655991

Update: I enabled config.whiny_nils = true in my production.rb file and now I am getting this error on Heroku but not running locally on my environment in production. I'm using Postgres locally.

G::Error: ERROR: null value in column "id" violates not-null constraint : INSERT INTO "sessions"

I bet you're migrating from MySQL.

Your table doesn't have a sequence , what pg uses instead of autoincrement . Instead of creating your table's id column with "id" integer NOT NULL, , use "id" serial, . Postgres will mention it's creating a sequence for you, and you can run \\d tablename in the command line to see it.

Log into Heroku and run the following:

rake db:sessions:clear

It looks like you may have old session data laying around.

If you haven't done it before, you log into your Heroku instance by running:

heroku run bash --app my_app

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM