dockerizing-ruby icon indicating copy to clipboard operation
dockerizing-ruby copied to clipboard

database "drkiq_development" does not exist

Open RedaBenh opened this issue 3 years ago • 1 comments

I clone the repo and run the command: dsd and i get this error:

 2023-01-24 11:56:16.076 UTC [33] FATAL:  database "drkiq_development" does not exist
dockerizing-ruby-master-drkiq-1     | E, [2023-01-24T11:56:16.076343 #7] ERROR -- : We could not find your database: drkiq_development. Which can be found in the database configuration file located at config/database.yml.
dockerizing-ruby-master-drkiq-1     | 
dockerizing-ruby-master-drkiq-1     | To resolve this issue:
dockerizing-ruby-master-drkiq-1     | 
dockerizing-ruby-master-drkiq-1     | - Did you create the database for this app, or delete it? You may need to create your database.
dockerizing-ruby-master-drkiq-1     | - Has the database name changed? Check your database.yml config has the correct database name.
dockerizing-ruby-master-drkiq-1     | 
dockerizing-ruby-master-drkiq-1     | To create your database, run:
dockerizing-ruby-master-drkiq-1     | 
dockerizing-ruby-master-drkiq-1     |         bin/rails db:create
dockerizing-ruby-master-drkiq-1     |  (ActiveRecord::NoDatabaseError)
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/activerecord-7.0.2.4/lib/active_record/connection_adapters/postgresql_adapter.rb:81:in `rescue in new_client'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/activerecord-7.0.2.4/lib/active_record/connection_adapters/postgresql_adapter.rb:77:in `new_client'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/activerecord-7.0.2.4/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `postgresql_connection'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/activerecord-7.0.2.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:656:in `public_send'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/activerecord-7.0.2.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:656:in `new_connection'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/activerecord-7.0.2.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:700:in `checkout_new_connection'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/activerecord-7.0.2.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:679:in `try_to_checkout_new_connection'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/activerecord-7.0.2.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:640:in `acquire_connection'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/activerecord-7.0.2.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:341:in `checkout'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/activerecord-7.0.2.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:181:in `connection'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/activerecord-7.0.2.4/lib/active_record/connection_adapters/abstract/connection_handler.rb:211:in `retrieve_connection'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/activerecord-7.0.2.4/lib/active_record/connection_handling.rb:313:in `retrieve_connection'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/activerecord-7.0.2.4/lib/active_record/connection_handling.rb:280:in `connection'
dockerizing-ruby-master-drkiq-1     | config/unicorn.rb:30:in `block in reload'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/unicorn-6.1.0/lib/unicorn/http_server.rb:541:in `spawn_missing_workers'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/unicorn-6.1.0/lib/unicorn/http_server.rb:143:in `start'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/unicorn-6.1.0/bin/unicorn:128:in `<top (required)>'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/bin/unicorn:25:in `load'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/bin/unicorn:25:in `<top (required)>'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/bundler-2.3.12/lib/bundler/cli/exec.rb:58:in `load'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/bundler-2.3.12/lib/bundler/cli/exec.rb:58:in `kernel_load'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/bundler-2.3.12/lib/bundler/cli/exec.rb:23:in `run'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/bundler-2.3.12/lib/bundler/cli.rb:483:in `exec'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/bundler-2.3.12/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/bundler-2.3.12/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/bundler-2.3.12/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/bundler-2.3.12/lib/bundler/cli.rb:31:in `dispatch'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/bundler-2.3.12/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/bundler-2.3.12/lib/bundler/cli.rb:25:in `start'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/bundler-2.3.12/exe/bundle:48:in `block in <top (required)>'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/bundler-2.3.12/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/gems/bundler-2.3.12/exe/bundle:36:in `<top (required)>'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/bin/bundle:25:in `load'
dockerizing-ruby-master-drkiq-1     | /usr/local/bundle/bin/bundle:25:in `<main>'
dockerizing-ruby-master-drkiq-1 exited with code 1
^CGracefully stopping... (press Ctrl+C again to force)
Aborting on container exit...

Can you please update the commands to run in README.md ?

RedaBenh avatar Jan 24 '23 12:01 RedaBenh

Yeah running the following should be included in the README.md.

docker compose run drkiq rake db:reset
docker compose run drkiq rake db:migrate

ryuheechul avatar Feb 08 '23 20:02 ryuheechul