Rails 5 PostgresSQL db: установка не работает должным образом - PullRequest
0 голосов
/ 27 июня 2019

Я следил за https://github.com/ManuelFrigerio/rails-blueprint/ шаблоном, но застрял.

Я не могу заставить rails db:setup && rails db:migrate работать. Вот ошибка, которую я получил:

rails db:setup && rails db:migrate
I, [2019-06-27T16:04:06.149763 #21471]  INFO -- : Celluloid 0.17.3 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
**************************************************
⛔️ WARNING: Sidekiq testing API enabled, but this is not the test environment.  Your jobs will not go to Redis.
**************************************************
FATAL:  Peer authentication failed for user "admin"
Couldn't create 'db_development' database. Please check your configuration.
rails aborted!
PG::ConnectionBad: FATAL:  Peer authentication failed for user "admin"
/home/cabox/.rvm/gems/ruby-2.5.0/gems/pg-1.1.3/lib/pg.rb:56:in `initialize'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/pg-1.1.3/lib/pg.rb:56:in `new'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/pg-1.1.3/lib/pg.rb:56:in `connect'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:692:in `connect'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:223:in `initialize'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:48:in `new'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:48:in `postgresql_connection'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:811:in `new_connection'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:855:in `checkout_new_connection'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:834:in `try_to_checkout_new_connection'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:795:in `acquire_connection'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:523:in `checkout'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:382:in `connection'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:1014:in `retrieve_connection'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:118:in `retrieve_connection'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:90:in `connection'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.3/lib/active_record/tasks/postgresql_database_tasks.rb:12:in `connection'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.3/lib/active_record/tasks/postgresql_database_tasks.rb:21:in `create'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.3/lib/active_record/tasks/database_tasks.rb:119:in `create'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.3/lib/active_record/tasks/database_tasks.rb:139:in `block in create_current'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.3/lib/active_record/tasks/database_tasks.rb:316:in `block in each_current_configuration'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.3/lib/active_record/tasks/database_tasks.rb:313:in `each'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.3/lib/active_record/tasks/database_tasks.rb:313:in `each_current_configuration'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.3/lib/active_record/tasks/database_tasks.rb:138:in `create_current'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.3/lib/active_record/railties/databases.rake:29:in `block (2 levels) in <main>'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/railties-5.2.3/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/railties-5.2.3/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/railties-5.2.3/lib/rails/command.rb:48:in `invoke'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/railties-5.2.3/lib/rails/commands.rb:18:in `<main>'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
/home/cabox/workspace/rails-blueprint/bin/rails:9:in `<top (required)>'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
/home/cabox/.rvm/gems/ruby-2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
/home/cabox/workspace/rails-blueprint/bin/spring:15:in `require'
/home/cabox/workspace/rails-blueprint/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
Tasks: TOP => db:setup => db:schema:load_if_ruby => db:create
(See full trace by running task with --trace)
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...