ruby on rails - Setting up Discourse on Ubuntu 12.04 LTS -
i have setup new database installing discourse in postgresql. when run rake db:migrate, creates of tables, fails:
-- execute("insert archetypes (name_key, created_at, updated_at) values ('poll', current_timestamp, current_timestamp)") -> 0.0009s -- add_column(:forum_threads, :archetype_id, :integer, {:default=>1, :null=>false}) -> 0.0209s == createarchetypes: migrated (0.0424s) ====================================== == addmetadatatoforumthreads: migrating ====================================== -- execute("create extension if not exists hstore") rake aborted! error has occurred, , later migrations canceled: pg::error: error: not open extension command file "/usr/share/postgresql/9.1/extension/hstore.control": no such file or directory : create extension if not exists hstore /usr/local/rvm/gems/ruby-1.9.3-p385/bundler/gems/miniprofiler-d149f34fcdb6/ruby/lib/patches/sql_patches.rb:155:in `exec' /usr/local/rvm/gems/ruby-1.9.3-p385/bundler/gems/miniprofiler-d149f34fcdb6/ruby/lib/patches/sql_patches.rb:155:in `async_exec' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/connection_adapters/postgresql_adapter.rb:652:in `block in execute' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activesupport-3.2.12/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `execute' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/migration.rb:466:in `block in method_missing' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/migration.rb:438:in `block in say_with_time' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/migration.rb:438:in `say_with_time' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/migration.rb:458:in `method_missing' /root/discourse/db/migrate/20120921162512_add_meta_data_to_forum_threads.rb:3:in `change' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/migration.rb:407:in `block (2 levels) in migrate' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/migration.rb:407:in `block in migrate' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:129:in `with_connection' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/migration.rb:389:in `migrate' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/migration.rb:528:in `migrate' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/migration.rb:720:in `block (2 levels) in migrate' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/migration.rb:775:in `call' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/migration.rb:775:in `block in ddl_transaction' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/transactions.rb:208:in `transaction' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/migration.rb:775:in `ddl_transaction' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/migration.rb:719:in `block in migrate' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/migration.rb:700:in `each' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/migration.rb:700:in `migrate' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/migration.rb:570:in `up' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/migration.rb:551:in `migrate' /usr/local/rvm/gems/ruby-1.9.3-p385/gems/activerecord-3.2.12/lib/active_record/railties/databases.rake:179:in `block (2 levels) in <top (required)>' /usr/local/rvm/gems/ruby-1.9.3-p385/bin/ruby_noexec_wrapper:14:in `eval' /usr/local/rvm/gems/ruby-1.9.3-p385/bin/ruby_noexec_wrapper:14:in `<main>' tasks: top => db:migrate
any clue?
it appears database error "could not open extension command file" while trying create extension [...] hstore
extension hstore
not installed.
on ubuntu, can install extension installing postgresql-contrib
package.
sudo apt-get install postgresql-contrib
user terryjray has documented enabling hstore in gist.
ruby-on-rails ubuntu rails-migrations hstore discourse
No comments:
Post a Comment