我想启动一个 jruby/rails 应用程序来使用 Postgres。但我想在开发和测试中运行时在 Postgres 兼容模式下使用 H2。
在 H2 或 postgresql 中启动应用程序没有问题,但如何配置使用嵌入式 H2 数据库运行 postgresql 适配器?
例如:像这样:
数据库.yml
development:
# adapter: jdbch2
# database: db/development/database
adapter: postgresql
encoding: unicode
database: database
# driver: org.h2.Driver
url: jdbc:h2:~/db/development;MODE=PostgreSQL
test:
...
Gemfile:
...
gem 'activerecord-jdbch2-adapter'
#gem 'jdbc-h2'
gem 'activerecord-jdbcpostgresql-adapter'
...
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)