When trying to generate a model with Rails and PostgreSQL, the command hangs without error

前端 未结 3 1623
迷失自我
迷失自我 2021-02-07 12:17

When using this command:

rails generate model Event name:string

Nothing happens, and I have to CTRL+c.

The versions I\'m using are:

3条回答
  •  生来不讨喜
    2021-02-07 13:04

    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
    

提交回复
热议问题