2

While deploying code using capistrano gem -

  • 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.\r rake aborted!\r

ruby 2.7 Using rails 6

Nehapeer
  • 89
  • 7

1 Answers1

1

I just ran into this same issue. The problem apparently comes from Psych 4.0.0 which makes Psych.load refuse to load untrusted data. (See the pull request Use Psych.safe_load by default #487)

Rails addresses this , but not until 7.0.2.4

You can restrict psych in your Gemfile:

gem 'psych', '< 4.0.0'

and then a normal bundle update psych probably resolves the issue (or you might have to update other gems as I did due to versions which required psych >= 4.0.0)

  • This helped me with another issue during rails 6 upgrade: server was not starting and errored with `warning: already initialized constant ActiveRecord::Base::OrmAdapter` and `warning: previous definition of OrmAdapter was here`. Downgrading rdoc to 6.3 was required, because version 6.4.0 needs psych > 4.0.0. as requirement. – adass Nov 05 '22 at 11:48