Postgresql安装hstore
错误信息:
-- 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'
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扩展,但是我的环境中没有安装
解决方法:
命令:# yum installpostgresql-contrib-9.2.13-1.el7_1.x86_64
继续执行迁移任务 : #rake db:migrate RAILS_ENV=development
OK了,项目可以正常启动了
postgres=# create extension hstore; CREATE EXTENSION postgres=#
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。