我不明白为什么当我的 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”
关于postgresql - postgresql_version 的 rspec NameError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18193682/