这是我的db/config.yml
文件:
adapter: postgres
server: localhost
etc.
当我使用rake db:migrate
时,它可以与适配器:postgresql
一起使用。否则它会提示:
Please install the postgres adapter: gem install activerecord-postgres-adapter
当我将 sequel
与 Sequel.connect(YAML.load_file(..))
结合使用时,它可以与 adapter: postgres
配合使用。否则它会提示:
Sequel::AdapterNotFound: LoadError: cannot load such file -- sequel/adapters/postgresql
该怎么办? :)
最佳答案
使用 Sequel,您必须使用 postgres
。显然 ActiveRecord 需要 postgresql。它们是不同的工具,您不应期望相同的配置文件适用于两者。
关于ruby - Ruby 的 PostgreSQL 适配器的正确名称是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22416267/