Recovering from failed/partially applied upgrade

Check this out:

I emptied all the tables that were giving me errors (one by one, in the end there were 7), until I could rebuild app without any error.

In your case it seems that the problem is a column:

PG::DuplicateColumn: ERROR: column "bookmarkable_id" of relation "bookmarks" already exists

Maybe you should look for which table it belongs to, to be able to empty it, or you can simply drop that column.

I believe that the problem is in that when migrating partially, those tables are already created, hence it cannot create them again and it returns an error. Perhaps a conditional could be added to this process, so that it does not give errors? (I am not an expert) @pfaffman