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

Role does not exist, maybe you have not run DB migrations #5914

Open
arunk opened this issue Aug 8, 2024 · 0 comments
Open

Role does not exist, maybe you have not run DB migrations #5914

arunk opened this issue Aug 8, 2024 · 0 comments

Comments

@arunk
Copy link

arunk commented Aug 8, 2024

I just ran a fresh bbb-3.0 alpha.7 install using the bbb-install script and installed Greenlight with it. I'm trying to setup an admin user for greenlight. So I tried to run: $ docker exec <greenlight:v3-container-id> exec bundle rake user:create["name","email","password", "user"]. I got this error: Unable to create user: 'arun' Role 'user' does not exist, maybe you have not run the DB migrations?

So I ran db:migrate and it ran without reporting any errors. But that didn't fix the issue.

Then I found this issue #1743 and I tried what it said:

docker exec -it greenlight-v2 bash
bundle exec rails c
Role.all.pluck(:name, :provider)

And I got back this output:
=> [["Administrator", "greenlight"], ["User", "greenlight"], ["Guest", "greenlight"], ["SuperAdmin", "bn"]]

Ok I finally figured out the issue, but I'm leaving it here in case anyone else faces the same problem, because documents linked in these issues like the one to gl-admin on bbb docs no longer exist.

So I had to use the bundle exec rake user:create and use the role 'Administrator' instead of 'admin' and also I tried 'SuperAdmin' and that didn't work either.

Also I tried #1753 and what it said about Role.create_default_roles("greenlight") and that gave an error about create_default_roles method not existing. So I guess this has changed in greenlight v3.

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

1 participant