When using this command:
rails generate model Event name:string
Nothing happens, and I have to CTRL+c.
The versions I\'m using are:
It appears you are not providing username
and password
for your development and test databases. You should verify you are able to connect to your database using
rails dbconsole
which will provide a database specific SQL-prompt that uses the credentials you provide in database.yml
. While sqlite3
is a file based program which does not need login credentials you will need them even for development mode if you use a database that is able to use different schema.
If you set up your development schema to work without a password you will still need to provide the schema name as username as in
username: easyEventTracker_development
Same thing happened to me and I wasn't using Spring so the solution didn't work.
I just quit the console, opened it up again, ran the same command and it worked.
There is a bug in Spring with Rails 4.1 which causes generators to hang.
Try running spring stop
and running the generator again.