我在使用 Docker 运行 Ruby on Rails 项目时遇到问题。我有预感这与运行 macOS Catalina (10.15.1) 有关。当我尝试这样做时,问题就出现了docker-compose run web rake db:create。
当我运行时,docker-compose run web rake db:create我得到以下输出:
Starting vft_db_1 ... done
PG::InvalidParameterValue: ERROR: invalid value for parameter "client_min_messages": "panic"
HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, notice, warning, error.
: SET client_min_messages TO 'panic'
/usr/local/bundle/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `async_exec'
/usr/local/bundle/gems/activerecord-
...
Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode", "host"=>"db", "username"=>"postgres", "password"=>nil, "pool"=>5, "database"=>"vft_test", "client_min_messages"=>"warning"}
Run Code Online (Sandbox Code Playgroud)
这是我的database.yml
default: &default
adapter: postgresql
encoding: unicode
host: db
username: …Run Code Online (Sandbox Code Playgroud)