我需要在postgresql数据库中存储一些机密数据。为此,我使用了pgcrypto gem。我将这个gem添加到Gemfile中,并在database.yml中将适配器名称更改为pgcrypto。并在包安装后执行以下命令。rails generate pgcrypto:install。但是我得到了以下错误,Could not load the 'pgcrypto' Active Record adapter. Ensure that the adapter is spelled correctly in config/database.yml and that you've added the necessary adapter gem to your Gemfile. (LoadError)帮助我解决这个问题。Ruby-2.6.0和rails 5.2.4.2
发布于 2020-07-14 09:21:15
我查看了gem的"pgcrypto“,但我不确定它是否会执行在Postgres数据库中安装扩展所需的"create extension”行。您可以尝试在您的数据库中运行此命令吗?开发和测试?
CREATE EXTENSION IF NOT EXISTS pgcrypto;https://stackoverflow.com/questions/62025270
复制相似问题