Closed arknand closed 9 years ago
Keep in mind warvox is not stable and any use should be tracking the rails4 branch (not master). The error you ran into is due to the warvox postgresql account not having sufficient rights:
PG::InsufficientPrivilege: ERROR: permission denied to create extension "intarray"
HINT: Must be superuser to create this extension.
Recreate the warvox database account with superuser rights or manually create the intarray extension to resolve this.
I fixed it following:
sudo su - postgres
createuser -s -l -d -P warvox
createdb warvox
exit
make database
make the warvox user superuser
ALTER ROLE warvox SUPERUSER;
I've followed the readme and where I've found error I apt-getted until the error went away. everything was without error in the end, I run bundle install, make, I set up the sql, passwords, and such. then I run make database or sudo make database and I get:
radio@radio-Virtual ~/warvox $ make database Checking the database.. RAILS_ENV=production bundle exec rake db:migrate == InitialSchema: migrating ================================================== -- execute("CREATE EXTENSION IF NOT EXISTS intarray") rake aborted! StandardError: An error has occurred, this and all later migrations canceled:
PG::InsufficientPrivilege: ERROR: permission denied to create extension "intarray" HINT: Must be superuser to create this extension. : CREATE EXTENSION IF NOT EXISTS intarray/var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/connection_adapters/postgresql_adapter.rb:650:in
async_exec' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/connection_adapters/postgresql_adapter.rb:650:in
block in execute' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/connection_adapters/abstract_adapter.rb:280:inblock in log' /var/lib/gems/1.9.1/gems/activesupport-3.2.20/lib/active_support/notifications/instrumenter.rb:20:in
instrument' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/connection_adapters/abstract_adapter.rb:275:inlog' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/connection_adapters/postgresql_adapter.rb:649:in
execute' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:466:inblock in method_missing' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:438:in
block in say_with_time' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:438:insay_with_time' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:458:in
method_missing' /home/radio/warvox/db/migrate/20121228171549_initial_schema.rb:5:inup' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:410:in
block (2 levels) in migrate' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:410:inblock in migrate' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/connection_adapters/abstract/connection_pool.rb:129:in
with_connection' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:389:inmigrate' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:528:in
migrate' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:720:inblock (2 levels) in migrate' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:775:in
call' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:775:inblock in ddl_transaction' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in
transaction' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/transactions.rb:208:intransaction' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:775:in
ddl_transaction' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:719:inblock in migrate' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:700:in
each' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:700:inmigrate' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:570:in
up' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:551:inmigrate' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/railties/databases.rake:193:in
block (2 levels) in <top (required)>' Tasks: TOP => db:migrate (See full trace by running task with --trace) make: *\ [database] Error 1 radio@radio-Virtual ~/warvox $ sudo make database [sudo] password for radio: Checking the database.. RAILS_ENV=production bundle exec rake db:migrate == InitialSchema: migrating ================================================== -- execute("CREATE EXTENSION IF NOT EXISTS intarray") rake aborted! StandardError: An error has occurred, this and all later migrations canceled:PG::InsufficientPrivilege: ERROR: permission denied to create extension "intarray" HINT: Must be superuser to create this extension. : CREATE EXTENSION IF NOT EXISTS intarray/var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/connection_adapters/postgresql_adapter.rb:650:in
async_exec' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/connection_adapters/postgresql_adapter.rb:650:in
block in execute' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/connection_adapters/abstract_adapter.rb:280:inblock in log' /var/lib/gems/1.9.1/gems/activesupport-3.2.20/lib/active_support/notifications/instrumenter.rb:20:in
instrument' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/connection_adapters/abstract_adapter.rb:275:inlog' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/connection_adapters/postgresql_adapter.rb:649:in
execute' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:466:inblock in method_missing' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:438:in
block in say_with_time' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:438:insay_with_time' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:458:in
method_missing' /home/radio/warvox/db/migrate/20121228171549_initial_schema.rb:5:inup' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:410:in
block (2 levels) in migrate' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:410:inblock in migrate' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/connection_adapters/abstract/connection_pool.rb:129:in
with_connection' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:389:inmigrate' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:528:in
migrate' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:720:inblock (2 levels) in migrate' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:775:in
call' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:775:inblock in ddl_transaction' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in
transaction' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/transactions.rb:208:intransaction' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:775:in
ddl_transaction' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:719:inblock in migrate' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:700:in
each' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:700:inmigrate' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:570:in
up' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:551:inmigrate' /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/railties/databases.rake:193:in
block (2 levels) in <top (required)>' Tasks: TOP => db:migrate (See full trace by running task with --trace) make: *\ [database] Error 1 radio@radio-Virtual ~/warvox $help?