Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error creating admin user for barong #28

Closed
otaviobonder-deel opened this issue Mar 4, 2018 · 4 comments
Closed

Error creating admin user for barong #28

otaviobonder-deel opened this issue Mar 4, 2018 · 4 comments

Comments

@otaviobonder-deel
Copy link

Running docker-compose run --rm barong bin/rake db:seed gives me this:

Starting workbench_db_1 ... done
Admin credentials: e2499ec6aad8b8e83a4a71fdaa677da493638443
rake aborted!
ActiveRecord::RecordInvalid: Validation failed: Uid has already been taken
/opt/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.4/lib/active_record/validations.rb:78:in `raise_validation_error'
/opt/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.4/lib/active_record/validations.rb:50:in `save!'
/opt/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.4/lib/active_record/attribute_methods/dirty.rb:43:in `save!'
/opt/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:313:in `block in save!'
/opt/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:384:in `block in with_transaction_returning_status'
/opt/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'
/opt/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'
/opt/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'
/opt/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'
/opt/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:210:in `transaction'
/opt/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:381:in `with_transaction_returning_status'
/opt/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.4/lib/active_record/transactions.rb:313:in `save!'
/opt/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.4/lib/active_record/suppressor.rb:46:in `save!'
/home/app/db/seeds.rb:23:in `block in <top (required)>'
/home/app/db/seeds.rb:20:in `each'
/home/app/db/seeds.rb:20:in `<top (required)>'
/opt/vendor/bundle/ruby/2.5.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `load'
/opt/vendor/bundle/ruby/2.5.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `block in load'
/opt/vendor/bundle/ruby/2.5.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
/opt/vendor/bundle/ruby/2.5.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `load'
/opt/vendor/bundle/ruby/2.5.0/gems/railties-5.1.4/lib/rails/engine.rb:549:in `load_seed'
/opt/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.4/lib/active_record/tasks/database_tasks.rb:270:in `load_seed'
/opt/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.4/lib/active_record/railties/databases.rake:184:in `block (2 levels) in <top (required)>'
/usr/local/bundle/bin/bundle:104:in `load'
/usr/local/bundle/bin/bundle:104:in `<main>'
Tasks: TOP => db:seed
(See full trace by running task with --trace)
@dmk
Copy link
Contributor

dmk commented Mar 7, 2018

Try the following steps:

# stop all the containers
make down

# make sure you have latest barong version and rebuild the image: 
docker-compose build barong

# drop db volume
docker volume prune

# setup barong (outputs admin password and new application credentials)
docker-compose run --rm bin/setup

@ssltrustcomau
Copy link

ssltrustcomau commented Mar 8, 2018

same issue, this did not fix it.

always the same: Uid has already been taken

@nosekefik
Copy link

I have the same problem

@arruah
Copy link

arruah commented Mar 13, 2018

Try thisj docker-compose run --rm barong bin/rake db:migrate:reset, and after that do docker-compose run --rm barong bin/rake db:seed again.

@shal shal closed this as completed Jul 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants