Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 轨道4+;PostgreSQL 9.6 hstore,can';t执行&x201C;创建扩展hstore”;_Ruby On Rails_Database_Postgresql_Hstore - Fatal编程技术网

Ruby on rails 轨道4+;PostgreSQL 9.6 hstore,can';t执行&x201C;创建扩展hstore”;

Ruby on rails 轨道4+;PostgreSQL 9.6 hstore,can';t执行&x201C;创建扩展hstore”;,ruby-on-rails,database,postgresql,hstore,Ruby On Rails,Database,Postgresql,Hstore,我需要让Hstore为我正在开发的Rails应用程序工作。我正在运行LinuxMint18和psql(9.6.1,Server9.5.5)以及PostgreSQLContrib9.6。据我所知,hstore应该通过安装postgresql contrib来安装和启用。但是,当我加载psql控制台并执行\dx时,我看不到“已安装扩展”中显示的Htop。当我跑的时候 CREATE EXTENSION hstore; 我得到了错误 ERROR: could not open extension c

我需要让Hstore为我正在开发的Rails应用程序工作。我正在运行LinuxMint18和psql(9.6.1,Server9.5.5)以及PostgreSQLContrib9.6。据我所知,hstore应该通过安装
postgresql contrib
来安装和启用。但是,当我加载psql控制台并执行
\dx
时,我看不到“已安装扩展”中显示的Htop。当我跑的时候

CREATE EXTENSION hstore;
我得到了错误

ERROR:  could not open extension control file "/usr/share/postgresql/9.5/extension/hstore.control": No such file or directory

任何帮助都将不胜感激。谢谢。

有两种可能的解决方案:

  sudo apt-get install postgresql-contrib-9.* 
其中9.*是您的postgres版本,
或者只需重新安装
pg
gem.

如果您运行的服务器是9.5,为什么要安装postgres contrib 9.6?