CI not working on github - 'database "test" does not exist'
I'm new to ci generally, so not sure if I'm missing an obvious step here.
I have the ci.yml file exactly* as in the standard repo (except that I commented out
the action runs - but fails to prepare the database
*my only change is that the db url is
and in my database.yml, my test database is
I have tried various permutations, but can't even get
am I missing something?
I have the ci.yml file exactly* as in the standard repo (except that I commented out
bin/rails test
to check that wasn't the problem)the action runs - but fails to prepare the database
*my only change is that the db url is
DATABASE_URL: postgres://postgres:password@localhost:5432/zaphod_test
and in my database.yml, my test database is
database: zaphod_test
I have tried various permutations, but can't even get
bin/rails db:create
to run without complaining that the db doesn't exist...am I missing something?
Run bin/rails test:prepare
10yarn install v1.22.17
11[1/4] Resolving packages...
12success Already up-to-date.
13Done in 0.28s.
14yarn run v1.22.17
15$ tailwindcss --postcss -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css
16
17warn - You have enabled the JIT engine which is currently in preview.
18warn - Preview features are not covered by semver, may introduce breaking changes, and can change at any time.
19
20Done in 896ms.
21Done in 1.63s.
22yarn install v1.22.17
23[1/4] Resolving packages...
24success Already up-to-date.
25Done in 0.24s.
26yarn run v1.22.17
27$ node esbuild.config.js
28Done in 0.24s.
29/home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/postgresql_adapter.rb:81:in `rescue in new_client': connection to server at "localhost" (::1), port 5432 failed: FATAL: database "zaphod_test" does not exist
30 (ActiveRecord::NoDatabaseError)
31 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/postgresql_adapter.rb:77:in `new_client'
32 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `postgresql_connection'
33 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:882:in `public_send'
34 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:882:in `new_connection'
35 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:926:in `checkout_new_connection'
36 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:905:in `try_to_checkout_new_connection'
37 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:866:in `acquire_connection'
38 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:588:in `checkout'
39 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:428:in `connection'
40 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:1128:in `retrieve_connection'
41 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_handling.rb:327:in `retrieve_connection'
42 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_handling.rb:283:in `connection'
43 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/acts-as-taggable-on-8.1.0/lib/acts_as_taggable_on/utils.rb:8:in `connection'
44 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/acts-as-taggable-on-8.1.0/lib/acts_as_taggable_on/utils.rb:16:in `using_mysql?'
45 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/acts-as-taggable-on-8.1.0/lib/acts-as-taggable-on.rb:98:in `force_binary_collation='
46 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/acts-as-taggable-on-8.1.0/lib/acts-as-taggable-on.rb:51:in `method_missing'
47 from /home/runner/work/Zaphod/Zaphod/config/initializers/acts_as_taggable.rb:1:in `<main>'
48 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:60:in `load'
49 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:60:in `load'
50 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:326:in `block in load'
51 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:299:in `load_dependency'
52 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:326:in `load'
53 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/engine.rb:681:in `block in load_config_initializer'
54 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/notifications.rb:205:in `instrument'
55 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/engine.rb:680:in `load_config_initializer'
56 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/engine.rb:634:in `block (2 levels) in <class:Engine>'
57 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/engine.rb:633:in `each'
58 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/engine.rb:633:in `block in <class:Engine>'
59 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/initializable.rb:32:in `instance_exec'
60 from /home/runner/work/Zaphod/Zaphod/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/initializable.rb:32:in `run'
Notifications
You’re not receiving notifications from this thread.