Deployment On Heroku failing -multiole database

41 Views Asked by At

I have trie multiple things to sort out this deploymetn but I can't manage this one:


-----> Building on the Heroku-22 stack
-----> Using buildpack: heroku/ruby
-----> Ruby app detected
-----> Installing bundler 2.3.25
-----> Removing BUNDLED WITH version in the Gemfile.lock
-----> Compiling Ruby/Rails
###### WARNING:
       Your app was upgraded to bundler 2.3.25.
       Previously you had a successful deploy with bundler 2.1.4.
       
       If you see problems related to the bundler version please refer to:
       https://devcenter.heroku.com/articles/bundler-version#known-upgrade-issues
       
-----> Using Ruby version: ruby-3.2.2
       Purging Cache. Changing stack from heroku-18 to heroku-22
###### WARNING:
       Removing `Gemfile.lock` because it was generated on Windows.
       Bundler will do a full resolve so native gems are handled properly.
       This may result in unexpected gem versions being used in your app.
       In rare occasions Bundler may not be able to resolve your dependencies at all.
       
       https://devcenter.heroku.com/articles/bundler-windows-gemfile
-----> Installing dependencies using bundler 2.3.25
       Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin bundle install -j4
       Fetching gem metadata from https://rubygems.org/...........
       Resolving dependencies...
       Fetching rake 13.1.0
       Installing rake 13.1.0
       Fetching concurrent-ruby 1.2.2
       Fetching minitest 5.20.0
       Fetching zeitwerk 2.6.12
       Fetching builder 3.2.4
       Installing zeitwerk 2.6.12
       Installing builder 3.2.4
       Installing minitest 5.20.0
       Installing concurrent-ruby 1.2.2
       Fetching erubi 1.12.0
       Fetching racc 1.7.3
       Fetching crass 1.0.6
       Installing erubi 1.12.0
       Installing racc 1.7.3 with native extensions
       Installing crass 1.0.6
       Fetching rack 2.2.8
       Fetching nio4r 2.7.0
       Installing rack 2.2.8
       Fetching websocket-extensions 0.1.5
       Installing nio4r 2.7.0 with native extensions
       Installing websocket-extensions 0.1.5
       Fetching mini_mime 1.0.3
       Fetching marcel 1.0.2
       Installing mini_mime 1.0.3
       Installing marcel 1.0.2
       Fetching date 3.3.4
       Fetching timeout 0.4.1
       Installing date 3.3.4 with native extensions
       Installing timeout 0.4.1
       Fetching execjs 2.9.1
       Installing execjs 2.9.1
       Fetching bcrypt 3.1.20
       Installing bcrypt 3.1.20 with native extensions
       Fetching msgpack 1.7.2
       Installing msgpack 1.7.2 with native extensions
       Using bundler 2.4.10
       Fetching connection_pool 2.4.1
       Installing connection_pool 2.4.1
       Fetching orm_adapter 0.5.0
       Installing orm_adapter 0.5.0
       Fetching method_source 1.0.0
       Installing method_source 1.0.0
       Fetching thor 1.3.0
       Installing thor 1.3.0
       Fetching ffi 1.16.3
       Installing ffi 1.16.3 with native extensions
       Fetching pg 1.5.4
       Installing pg 1.5.4 with native extensions
       Fetching tilt 2.3.0
       Installing tilt 2.3.0
       Fetching semantic_range 3.0.0
       Installing semantic_range 3.0.0
       Fetching i18n 1.14.1
       Installing i18n 1.14.1
       Fetching tzinfo 2.0.6
       Installing tzinfo 2.0.6
       Fetching rack-test 2.1.0
       Installing rack-test 2.1.0
       Fetching websocket-driver 0.7.6
       Installing websocket-driver 0.7.6 with native extensions
       Fetching warden 1.2.9
       Installing warden 1.2.9
       Fetching rack-proxy 0.7.7
       Installing rack-proxy 0.7.7
       Fetching sprockets 4.2.1
       Installing sprockets 4.2.1
       Fetching net-protocol 0.2.2
       Installing net-protocol 0.2.2
       Fetching autoprefixer-rails 10.4.16.0
       Installing autoprefixer-rails 10.4.16.0
       Fetching uglifier 4.2.0
       Installing uglifier 4.2.0
       Fetching nokogiri 1.15.5 (x86_64-linux)
       Installing nokogiri 1.15.5 (x86_64-linux)
       Fetching redis-client 0.19.1
       Installing redis-client 0.19.1
       Fetching puma 6.4.0
       Installing puma 6.4.0 with native extensions
       Fetching bootsnap 1.17.0
       Installing bootsnap 1.17.0 with native extensions
       Fetching faker 3.2.2
       Installing faker 3.2.2
       Fetching activesupport 6.1.3.1
       Installing activesupport 6.1.3.1
       Fetching net-pop 0.1.2
       Installing net-pop 0.1.2
       Fetching net-smtp 0.4.0
       Installing net-smtp 0.4.0
       Fetching loofah 2.22.0
       Installing loofah 2.22.0
       Fetching redis 5.0.8
       Installing redis 5.0.8
       Fetching net-imap 0.4.8
       Installing net-imap 0.4.8
       Fetching rails-dom-testing 2.2.0
       Installing rails-dom-testing 2.2.0
       Fetching globalid 1.2.1
       Installing globalid 1.2.1
       Fetching activemodel 6.1.3.1
       Installing activemodel 6.1.3.1
       Fetching pundit 2.3.1
       Installing pundit 2.3.1
       Fetching rails-html-sanitizer 1.6.0
       Installing rails-html-sanitizer 1.6.0
       Fetching mail 2.8.1
       Installing mail 2.8.1
       Fetching activejob 6.1.3.1
       Installing activejob 6.1.3.1
       Fetching activerecord 6.1.3.1
       Installing activerecord 6.1.3.1
       Fetching actionview 6.1.3.1
       Installing actionview 6.1.3.1
       Fetching actionpack 6.1.3.1
       Fetching jbuilder 2.11.5
       Installing actionpack 6.1.3.1
       Installing jbuilder 2.11.5
       Fetching sassc 2.4.0
       Fetching actioncable 6.1.3.1
       Installing sassc 2.4.0 with native extensions
       Installing actioncable 6.1.3.1
       Fetching activestorage 6.1.3.1
       Installing activestorage 6.1.3.1
       Fetching actionmailer 6.1.3.1
       Installing actionmailer 6.1.3.1
       Fetching railties 6.1.3.1
       Installing railties 6.1.3.1
       Fetching meta-tags 2.19.0
       Installing meta-tags 2.19.0
       Fetching sprockets-rails 3.4.2
       Installing sprockets-rails 3.4.2
       Fetching simple_form 5.3.0
       Installing simple_form 5.3.0
       Fetching actionmailbox 6.1.3.1
       Installing actionmailbox 6.1.3.1
       Fetching actiontext 6.1.3.1
       Installing actiontext 6.1.3.1
       Fetching responders 3.1.1
       Installing responders 3.1.1
       Fetching webpacker 5.4.4
       Installing webpacker 5.4.4
       Fetching rails 6.1.3.1
       Installing rails 6.1.3.1
       Fetching devise 4.9.3
       Installing devise 4.9.3
       Fetching font-awesome-sass 5.12.0
       Fetching sassc-rails 2.1.2
       Installing sassc-rails 2.1.2
       Installing font-awesome-sass 5.12.0
       Bundle complete! 23 Gemfile dependencies, 75 gems now installed.
       Gems in the groups 'development' and 'test' were not installed.
       Bundled gems are installed into `./vendor/bundle`
       Post-install message from devise:
       
       [DEVISE] Please review the [changelog] and [upgrade guide] for more info on Hotwire / Turbo integration.
       
         [changelog] https://github.com/heartcombo/devise/blob/main/CHANGELOG.md
         [upgrade guide] https://github.com/heartcombo/devise/wiki/How-To:-Upgrade-to-Devise-4.9.0-%5BHotwire-Turbo-integration%5D
         
       Bundle completed (82.12s)
       Cleaning up the bundler cache.
       Removing bundler (2.3.25)
###### WARNING:
       Installing a default version (20.9.0) of Node.js.
       This version is not pinned and can change over time, causing unexpected failures.
       
       Heroku recommends placing the `heroku/nodejs` buildpack in front of
       `heroku/ruby` to install a specific version of node:
       
       https://devcenter.heroku.com/articles/ruby-support#node-js-support
###### WARNING:
       Installing a default version (1.22.19) of Yarn
       This version is not pinned and can change over time, causing unexpected failures.
       
       Heroku recommends placing the `heroku/nodejs` buildpack in front of the `heroku/ruby`
       buildpack as it offers more comprehensive Node.js support, including the ability to
       customise the Node.js version:
       
       https://devcenter.heroku.com/articles/ruby-support#node-js-support
-----> Installing node-v20.9.0-linux-x64
-----> Installing yarn-v1.22.19
-----> Detecting rake tasks
-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       Rails couldn't infer whether you are using multiple databases from your database.yml and can't generate the tasks for the non-primary databases. If you'd like to use this feature, please simplify your ERB.
       rake aborted!
       Psych::AliasesNotEnabled: Cannot load database configuration: (Psych::AliasesNotEnabled)
       Alias parsing was not enabled. To enable it, pass `aliases: true` to `Psych::load` or `Psych::safe_load`.
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/configuration_file.rb:22:in `parse'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/configuration_file.rb:18:in `parse'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/railties-6.1.3.1/lib/rails/application/configuration.rb:275:in `database_configuration'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activerecord-6.1.3.1/lib/active_record/railtie.rb:221:in `block (2 levels) in <class:Railtie>'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/lazy_load_hooks.rb:71:in `class_eval'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/lazy_load_hooks.rb:61:in `with_execution_control'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/lazy_load_hooks.rb:66:in `execute_hook'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/lazy_load_hooks.rb:43:in `block in on_load'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/lazy_load_hooks.rb:42:in `each'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/lazy_load_hooks.rb:42:in `on_load'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activerecord-6.1.3.1/lib/active_record/railtie.rb:217:in `block in <class:Railtie>'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/railties-6.1.3.1/lib/rails/initializable.rb:32:in `instance_exec'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/railties-6.1.3.1/lib/rails/initializable.rb:32:in `run'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/railties-6.1.3.1/lib/rails/initializable.rb:61:in `block in run_initializers'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/railties-6.1.3.1/lib/rails/initializable.rb:60:in `run_initializers'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/railties-6.1.3.1/lib/rails/application.rb:384:in `initialize!'
       /tmp/build_ce7afffb/config/environment.rb:5:in `<main>'
       <internal:/tmp/build_ce7afffb/vendor/ruby-3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
       <internal:/tmp/build_ce7afffb/vendor/ruby-3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/dependencies.rb:332:in `block in require'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/dependencies.rb:299:in `load_dependency'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/dependencies.rb:332:in `require'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/railties-6.1.3.1/lib/rails/application.rb:360:in `require_environment!'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/railties-6.1.3.1/lib/rails/application.rb:526:in `block in run_tasks_blocks'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/task.rb:61:in `block (2 levels) in define'
       
       Caused by:
       Psych::AliasesNotEnabled: Alias parsing was not enabled. To enable it, pass `aliases: true` to `Psych::load` or `Psych::safe_load`. (Psych::AliasesNotEnabled)
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/configuration_file.rb:22:in `parse'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/configuration_file.rb:18:in `parse'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/railties-6.1.3.1/lib/rails/application/configuration.rb:275:in `database_configuration'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activerecord-6.1.3.1/lib/active_record/railtie.rb:221:in `block (2 levels) in <class:Railtie>'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/lazy_load_hooks.rb:71:in `class_eval'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/lazy_load_hooks.rb:61:in `with_execution_control'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/lazy_load_hooks.rb:66:in `execute_hook'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/lazy_load_hooks.rb:43:in `block in on_load'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/lazy_load_hooks.rb:42:in `each'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/lazy_load_hooks.rb:42:in `on_load'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activerecord-6.1.3.1/lib/active_record/railtie.rb:217:in `block in <class:Railtie>'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/railties-6.1.3.1/lib/rails/initializable.rb:32:in `instance_exec'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/railties-6.1.3.1/lib/rails/initializable.rb:32:in `run'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/railties-6.1.3.1/lib/rails/initializable.rb:61:in `block in run_initializers'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/railties-6.1.3.1/lib/rails/initializable.rb:60:in `run_initializers'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/railties-6.1.3.1/lib/rails/application.rb:384:in `initialize!'
       /tmp/build_ce7afffb/config/environment.rb:5:in `<main>'
       <internal:/tmp/build_ce7afffb/vendor/ruby-3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
       <internal:/tmp/build_ce7afffb/vendor/ruby-3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/dependencies.rb:332:in `block in require'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/dependencies.rb:299:in `load_dependency'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.3.1/lib/active_support/dependencies.rb:332:in `require'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/railties-6.1.3.1/lib/rails/application.rb:360:in `require_environment!'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/railties-6.1.3.1/lib/rails/application.rb:526:in `block in run_tasks_blocks'
       /tmp/build_ce7afffb/vendor/bundle/ruby/3.2.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/task.rb:61:in `block (2 levels) in define'
       Tasks: TOP => environment
       (See full trace by running task with --trace)

 !
 !     Precompiling assets failed.
 !
 !     Push rejected, failed to compile Ruby app.
 !     Push failed

I have set this in database.yml

production:
  <<: *default
  database: rails-christophe-anais_production
  username: rails-christophe-anais
  password: <%= ENV['RAILS-CHRISTOPHE-ANAIS_DATABASE_PASSWORD'] %>

What can I miss ?

Thansk a lot for any help. I haven't done much coding lately so I am quite fighting. But this is something I 've done long time ago for a friend and she really needs me to update it...

Thanks

I have removed this

`#production:

url: <%= ENV['DATABASE_URL'] %>

#`

that was also in the database.yml folder...

But I get it deployed by the past haveing both, so maybe this deployment issue has something to do with updates I missed 6 I fought a lot with dependencies.

I expect to deploy that code at some point ;)

0

There are 0 best solutions below