Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX Unknown alias: default (Psych::BadAlias) #93

Merged
merged 4 commits into from
Mar 8, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Check Psych version instead of catching argument error
  • Loading branch information
ps-ruby committed Mar 7, 2022
commit 2f03b61bc15edf88eec3d1077cb842633cf34bdb
9 changes: 6 additions & 3 deletions lib/kuby/plugins/rails_app/database.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# typed: false
require 'yaml'
require 'pry'

module Kuby
module Plugins
Expand Down Expand Up @@ -52,9 +53,11 @@ def db_config

def db_configs
@db_configs ||= begin
ps-ruby marked this conversation as resolved.
Show resolved Hide resolved
YAML.load(File.read(db_config_path), aliases: true)
rescue ArgumentError
YAML.load(File.read(db_config_path))
if Psych::VERSION > '4'
YAML.load(File.read(db_config_path), aliases: true)
else ArgumentError
YAML.load(File.read(db_config_path))
end
end
end

Expand Down