"rails generate model" hangs

Just a hunch, but by any chance, are you still running a server process somewhere on your machine? That could be holding a lock that is preventing the new table from getting built.


Don't kill spring, just use the built in spring stop


Follow below steps

1 - Create rails App :

 rails new myApp

2 - Create model :

 rails generate model mytable name:string

3 - Drop The database :

 rake db:drop

4 - Delete rails App :

 rm -rf myApp

5 - Re-Create rails App :

 rails new myApp

6 - Recreate Database

 rake db:create

7 - Re-Create model :

 rails generate model mytable name:string