gpt4 book ai didi

ruby-on-rails - rails 小号 : undefined method `symbolize_keys'

转载 作者:数据小太阳 更新时间:2023-10-29 07:43:18 24 4
gpt4 key购买 nike

<分区>

我有一个 Rails 3.2.12 应用程序,但是当我运行 rails s 时,我收到以下错误:connection_specification.rb:45:in 'resolve_hash_connection': undefined method 'symbolize_keys' for #<String:0x00000006c16b40> (NoMethodError)

connection_specification.rb 相关方法:

def resolve_hash_connection(spec) # :nodoc:
spec = spec.symbolize_keys # Line 45

raise(AdapterNotSpecified, "database configuration does not specify adapter") unless spec.key?(:adapter)

begin
require "active_record/connection_adapters/#{spec[:adapter]}_adapter"
rescue LoadError => e
raise LoadError, "Please install the #{spec[:adapter]} adapter: `gem install activerecord-#{spec[:adapter]}-adapter` (#{e.message})", e.backtrace
end

adapter_method = "#{spec[:adapter]}_connection"

ConnectionSpecification.new(spec, adapter_method)
end

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com