gpt4 book ai didi

ruby-on-rails - PG::InvalidParameterValue: 错误:必须指定要安装的版本

转载 作者:行者123 更新时间:2023-11-29 13:56:29 27 4
gpt4 key购买 nike

正在尝试迁移 Discourse数据库,但是 20120921162512_add_meta_data_to_forum_threads.rb似乎产生以下错误:

== 20120921162512 AddMetaDataToForumThreads: migrating ========================
-- execute("CREATE EXTENSION IF NOT EXISTS hstore")
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::InvalidParameterValue: ERROR: version to install must be specified
: CREATE EXTENSION IF NOT EXISTS hstore/usr/home/www/_myapp/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.10/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `async_exec'
/usr/home/www/_myapp/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.10/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `block in execute'
...

最佳答案

解决此问题的最简单方法是让您的默认 Postgres 模板数据库已经安装了 hstore 扩展,如下所示:


psql -d template1 -c '创建扩展 hstore;'

请参阅此答案以获取详尽的解释:https://stackoverflow.com/a/11584751/483260

关于ruby-on-rails - PG::InvalidParameterValue: 错误:必须指定要安装的版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30782806/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com