how to UNDO ruby script/generate model table and migration

Looks like the table did not get dropped. Either the down action in the Migration did not include the drop command or the command rake db:migrate VERSION=6 did not succeed. To resolve the issue you need to take one of the following steps:

rake db:reset #Only works in Edge or w/ Sake
drop your database, recreate it and remigrate
drop the specific table that was causing the problem either from the command line or from a gui client.
add :force => true to your migrations table create line (think carefully before doing this one)

Good Luck,
Rob Kaufman