Content
You are here:
Error when running rake db:create:all
Added by Ciobanu Constantin over 10 years ago
My problem is the following i tried to install OpenProject, i managed to get as far(with alot of hickups ofc ) as finalizing the last steps of the instalation but when i run: bundle exec rake db:create:all
is get this error
I can’t seem to wrap my head around it if someone can offer some help i will greatly appreciate it.
Replies (13)
Hello Ciobanu,
can you please go to the OpenProject root folder and post the output of
git status
Best
Ratzi
Hi,
the error reads like something in the Gemfile (maybe the
Gemfile.plugins
) is mistyped.The file should look like this:
Maybe one line in your Gemfile(s) starts with “em” instead of “gem”?
cheers,
tessi
Christian Ratz wrote:
root@wedge [/home/myvuwazq/public_html/open/openproject]# git status
#
#
#
no changes added to commit (use “git add” and/or “git commit -a”)
this is the output
Philipp Tessenow wrote:
Cheers that was it i check all the files but not that one , it was true a g was missing from first like gem. , thanks alot
I bundled installed everything went fine when i do run
bundle exec rake db:create:all
require 'rails/all'... 0.640s Bundler.require... 2.310s FATAL: Peer authentication failed for user "openproject" /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `initialize' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `new' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `connect' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:324:in `initialize' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `new' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `postgresql_connection' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout' /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection' /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:144:in `rescue in create_database' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:85:in `create_database' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:52:in `block (5 levels) in <top (required)>' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:184:in `local_database?' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:52:in `block (4 levels) in <top (required)>' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:38:in `each_value' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:38:in `block (3 levels) in <top (required)>' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:240:in `call' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:235:in `each' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain' /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:150:in `invoke_task' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:106:in `block (2 levels) in top_level' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:106:in `each' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:106:in `block in top_level' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:115:in `run_with_threads' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:100:in `top_level' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:78:in `block in run' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:75:in `run' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/bin/rake:33:in `<top (required)>' /usr/local/rvm/gems/ruby-2.1.2/bin/rake:23:in `load' /usr/local/rvm/gems/ruby-2.1.2/bin/rake:23:in `<main>' /usr/local/rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval' /usr/local/rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>' Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"utf8", "database"=>"openproject", "pool"=>5, "username"=>"openproject", "password"=>"openproject"} FATAL: Peer authentication failed for user "openproject" /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `initialize' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `new' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `connect' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:324:in `initialize' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `new' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `postgresql_connection' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout' /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection' /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:144:in `rescue in create_database' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:85:in `create_database' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:52:in `block (5 levels) in <top (required)>' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:184:in `local_database?' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:52:in `block (4 levels) in <top (required)>' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:38:in `each_value' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:38:in `block (3 levels) in <top (required)>' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:240:in `call' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:235:in `each' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain' /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:150:in `invoke_task' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:106:in `block (2 levels) in top_level' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:106:in `each' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:106:in `block in top_level' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:115:in `run_with_threads' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:100:in `top_level' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:78:in `block in run' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:75:in `run' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/bin/rake:33:in `<top (required)>' /usr/local/rvm/gems/ruby-2.1.2/bin/rake:23:in `load' /usr/local/rvm/gems/ruby-2.1.2/bin/rake:23:in `<main>' /usr/local/rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval' /usr/local/rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>' Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"utf8", "database"=>"openproject_development", "pool"=>5, "username"=>"openproject", "password"=>"openproject"} FATAL: Peer authentication failed for user "openproject" /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `initialize' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `new' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `connect' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:324:in `initialize' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `new' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `postgresql_connection' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout' /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection' /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:144:in `rescue in create_database' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:85:in `create_database' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:52:in `block (5 levels) in <top (required)>' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:184:in `local_database?' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:52:in `block (4 levels) in <top (required)>' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:38:in `each_value' /usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:38:in `block (3 levels) in <top (required)>' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:240:in `call' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:235:in `each' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain' /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:150:in `invoke_task' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:106:in `block (2 levels) in top_level' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:106:in `each' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:106:in `block in top_level' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:115:in `run_with_threads' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:100:in `top_level' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:78:in `block in run' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:75:in `run' /usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/bin/rake:33:in `<top (required)>' /usr/local/rvm/gems/ruby-2.1.2/bin/rake:23:in `load' /usr/local/rvm/gems/ruby-2.1.2/bin/rake:23:in `<main>' /usr/local/rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval' /usr/local/rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>' Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"utf8", "database"=>"openproject_test", "pool"=>5, "username"=>"openproject", "password"=>"openproject"}
I am sorry for spaming all the lines pretty new to this, trying to make it work.
Hello again,
this time—I guess—the credentials in your
database.yml
file are wrong. OpenProject cannot connect to the database. Please check if the username and password for the databases configured inconfig/database.yml
are correct.cheers,
tessi
This is my database.yml
The file looks good. However, the username and password must match your postgresql database credentials. We have no way to check this, but you can.
On the command line you should be able to connect to your postgresql database with the following command:
If you have a postgresql username and password that works with the
psql
command, you can use exactly those in yourdatabase.yml
.BTW: please use a more secure password and never post passwords on a public forum.
cheers,
tessi
Philipp Tessenow wrote:
Cheers for the reply , can this be one of the issues ?
WARNING: psql version 8.4, server version 9.3.
And this is the response when i run your command and type the password for it.
psql: FATAL: Peer authentication failed for user “openproject”
This is probably the issue. Are you sure you have the proper database user and passwords set? Does the database-user has the rights to login and see/create the openproject databases?
I don’t know which operating system you use. It seems like you use some kind of unix — the Ubuntu Postgresql wiki page may be of help to you: https://help.ubuntu.com/community/PostgreSQL
I am running CentOS release 6.5 (Final)
postgres=# CREATE ROLE openproject LOGIN ENCRYPTED PASSWORD “myownpassword” NOINHERIT VALID UNTIL ‘infinity’;
ERROR: role “openproject” already exists
postgres=# CREATE DATABASE openproject WITH ENCODING=‘UTF8’ OWNER=openproject;
ERROR: database “openproject” already exists
postgres=# CREATE DATABASE openproject_development WITH ENCODING=‘UTF8’ OWNER=openproject;
ERROR: database “openproject_development” already exists
postgres=# CREATE DATABASE openproject_test WITH ENCODING=‘UTF8’ OWNER=openproject;
ERROR: database “openproject_test” already exists
So all these steps are made right the password is correct
After trying to recreate some steps i bumped in to this :
my command:gem install pg -v ‘0.17.1’ — —with-pg-config=/usr/pgsql-9.3/bin/pg_config
Fetching: pg-0.17.1.gem (100%)
Building native extensions with: ‘—with-pg-config=/usr/pgsql-9.3/bin/pg_config’
This could take a while…
Successfully installed pg-0.17.1
invalid options: -f fivefish
(invalid options are ignored)
Parsing documentation for pg-0.17.1
Installing ri documentation for pg-0.17.1
Done installing documentation for pg after 2 seconds
1 gem installed
After running the bundle exec rake db:create:all command again i get another error:
require ‘rails/all’… 0.640s
Bundler.require… 2.390s
FATAL: no pg_hba.conf entry for host “[local]”, user “openproject”, database “postgres”, SSL off
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `initialize’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `new’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `connect’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:324:in `initialize’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `new’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `postgresql_connection’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout’
/usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection’
/usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:144:in `rescue in create_database’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:85:in `create_database’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:52:in `block (5 levels) in <top (required)>’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:184:in `local_database?’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:52:in `block (4 levels) in <top (required)>’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:38:in `each_value’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:38:in `block (3 levels) in <top (required)>’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:240:in `call’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:235:in `each’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain’
/usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:150:in `invoke_task’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:106:in `block (2 levels) in top_level’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:106:in `each’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:106:in `block in top_level’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:115:in `run_with_threads’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:100:in `top_level’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:78:in `block in run’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:75:in `run’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/bin/rake:33:in `<top (required)>’
/usr/local/rvm/gems/ruby-2.1.2/bin/rake:23:in `load’
/usr/local/rvm/gems/ruby-2.1.2/bin/rake:23:in `
’
/usr/local/rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval’
/usr/local/rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `
’
Couldn’t create database for {“adapter”=>“postgresql”, “encoding”=>“utf8”, “database”=>“openproject”, “pool”=>5, “username”=>“openproject”, “password”=>“openproject”}
FATAL: no pg_hba.conf entry for host “[local]”, user “openproject”, database “postgres”, SSL off
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `initialize’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `new’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `connect’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:324:in `initialize’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `new’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `postgresql_connection’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout’
/usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection’
/usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:144:in `rescue in create_database’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:85:in `create_database’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:52:in `block (5 levels) in <top (required)>’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:184:in `local_database?’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:52:in `block (4 levels) in <top (required)>’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:38:in `each_value’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:38:in `block (3 levels) in <top (required)>’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:240:in `call’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:235:in `each’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain’
/usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:150:in `invoke_task’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:106:in `block (2 levels) in top_level’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:106:in `each’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:106:in `block in top_level’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:115:in `run_with_threads’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:100:in `top_level’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:78:in `block in run’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:75:in `run’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/bin/rake:33:in `<top (required)>’
/usr/local/rvm/gems/ruby-2.1.2/bin/rake:23:in `load’
/usr/local/rvm/gems/ruby-2.1.2/bin/rake:23:in `
’
/usr/local/rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval’
/usr/local/rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `
’
Couldn’t create database for {“adapter”=>“postgresql”, “encoding”=>“utf8”, “database”=>“openproject_development”, “pool”=>5, “username”=>“openproject”, “password”=>“openproject”}
FATAL: no pg_hba.conf entry for host “[local]”, user “openproject”, database “postgres”, SSL off
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `initialize’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `new’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `connect’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:324:in `initialize’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `new’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `postgresql_connection’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout’
/usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection’
/usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:144:in `rescue in create_database’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:85:in `create_database’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:52:in `block (5 levels) in <top (required)>’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:184:in `local_database?’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:52:in `block (4 levels) in <top (required)>’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:38:in `each_value’
/usr/local/rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:38:in `block (3 levels) in <top (required)>’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:240:in `call’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:235:in `each’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain’
/usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:150:in `invoke_task’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:106:in `block (2 levels) in top_level’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:106:in `each’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:106:in `block in top_level’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:115:in `run_with_threads’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:100:in `top_level’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:78:in `block in run’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:75:in `run’
/usr/local/rvm/gems/ruby-2.1.2/gems/rake-10.3.2/bin/rake:33:in `<top (required)>’
/usr/local/rvm/gems/ruby-2.1.2/bin/rake:23:in `load’
/usr/local/rvm/gems/ruby-2.1.2/bin/rake:23:in `
’
/usr/local/rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval’
/usr/local/rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `
’
Couldn’t create database for {“adapter”=>“postgresql”, “encoding”=>“utf8”, “database”=>“openproject_test”, “pool”=>5, “username”=>“openproject”, “password”=>“openproject”}
Hi
I had a similar issue.
Originally I could create databases and the DB migrate worked, but then it mysteriously stopped working
the fix was to add “createdb” to the postgresl user openproject
to be specific
when adding the role open project in psql, the line
is now
hope this helps
Brendan