gpt4 book ai didi

postgresql - postgresql_version 的 rspec NameError

转载 作者:行者123 更新时间:2023-11-29 12:13:31 25 4
gpt4 key购买 nike

我不明白为什么我的 Rails 应用程序没有使用 postgres 时会看到这个错误。关于如何解决这个问题有什么建议吗?

c:\>rspec my_spec.rb

An error occurred in an after hook
NameError: undefined local variable or method `postgresql_version' for #<ActiveRecord::ConnectionAdapters::SQLite3Adapter:0x41284c8>
occurred at C:/Ruby193/lib/ruby/gems/1.9.1/gems/database_cleaner-1.1.1/lib/database_cleaner/active_record/truncation.rb:123:in `db_version'

F

最佳答案

据此,目前推荐的做法是使用“<1.1.0”的版本规则

https://github.com/bmabey/database_cleaner/issues/224

关于postgresql - postgresql_version 的 rspec NameError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18193682/

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