PostgreSQL安装hstore
2015-07-15 23:03
411 查看
PostgreSQL安装hstore
搭建rubygems.org 这个项目,执行迁移 # rake db:migrate RAILS_ENV=development 时候遇到一个错误错误信息:
-- enable_extension("hstore")
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::UndefinedFile: 错误: 无法打开扩展控制文件 "/usr/share/pgsql/extension/hstore.control": 没有那个文件或目录
: CREATE EXTENSION IF NOT EXISTS "hstore"/usr/local/rvm/gems/ruby-2.1.6/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:596:in `async_exec'
原因:要启用hstore扩展,但是我的环境中没有安装
解决方法:
安装缺失的hostore ,而hostore是 postgresql-contrib 的东西 ,所以安装 postgresql-contrib
命令:# yum install postgresql-contrib-9.2.13-1.el7_1.x86_64
继续执行迁移任务 : #rake db:migrate RAILS_ENV=development
OK了,项目可以正常启动了
如果平时使用可以到postgresql数据库 启动 # psql 安装hstore扩展
postgres=# create extension hstore; CREATE EXTENSION postgres=#
参考链接:http://www.postgresguide.com/sexy/hstore.html
http://www.cnblogs.com/gaojian/p/3351294.html
相关文章推荐
- SparkSQL(Spark-1.4.0)实战系列(一)——DataFrames基础
- SQLite数据库
- ORACLE中创建表空间,创建表,修改表,授权
- MPP 架构数据库
- Sql日期时间格式转换 备用
- 分布式Redis集群解决方案
- Oracle数据库实例间的连接—link
- ios即时通讯客户端开发之-mac上安装MySQL
- SQLite的使用详解
- mongodb备份数据库
- Mysql数据库存储引擎
- 数据库概况
- MyBatis知多少(8)关系型数据库
- 创建数据库和表————三大范式
- DATABASE CONNECTION ERROR (1): THE MYSQL ADAPTER 'MYSQLI' IS NOT AVAILABLE.解决办法
- 在oracle数据库中只知道他的生日,怎么查出他的年龄
- Windows下MongoDB的安装及配置
- ubuntu 重新安装mysql
- Linux下安装配置MongoDB数据库
- Linux下安装配置MongoDB数据库