Rails Local Server Error: No such file database.yml

后端 未结 3 697
粉色の甜心
粉色の甜心 2021-01-05 04:25

I\'m working on a project with another developer and I\'m getting an error when trying to start my local server. Missing database.yml. I\'m just using sqlite and another dev

相关标签:
3条回答
  • 2021-01-05 05:02

    You can use a different database configuration than the other developers of your project. Just add the database.yml to the .gitignore file. This is done automatically when generating a rails app and since the database.yml is missing on your machine that is already the case for your project too. So just create your personal database.yml file in the config folder of the app for your development environment.

    Like this as minimal config:

    development:
      adapter: sqlite3
      database: db/development.sqlite3
    

    But Mongrel is not a database but a Web Server. Maybe the other developer is a using Mongo DB?

    0 讨论(0)
  • 2021-01-05 05:07

    Mongrel is a web server no?

    You still need a database.yml file.

    0 讨论(0)
  • 2021-01-05 05:17

    So still need add database.yml. You need one defining your SQLite Database. Like so:

    development:
      adapter: sqlite3
      database: db/development.sqlite3
      pool: 5
      timeout: 5000
    
    0 讨论(0)
提交回复
热议问题