运动夹克Ruby installation instructions表明
For production, specify your database:
ENV["BLAZER_DATABASE_URL"] = "postgres://user:password@hostname:5432/database"
在本地开发中,仍然会生成以下错误
ActionView::Template::Error (undefined method `each' for nil:NilClass
settings["data_sources"].each do |id, s|
因此,需要将数据源设置为config/blazer.yml
PostgreSQL日志(log)表明
2024-01-14 10:14:44.406 CET [1978] LOG: listening on IPv4 address "127.0.0.1", port 5432
2024-01-14 10:14:44.407 CET [1978] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"
然而,以下配置
data_sources:
main:
url: "postgres://kk@example.com:12345677@127.0.0.1:5432/boilerauth_development"
仍然会产生投诉
URI::InvalidURIError (bad URI(is not URI?): "postgres://kk@example.com:12345677@127.0.0.1:5432/boilerauth_development"):
个
这种配置的错误之处在哪里?