-
Notifications
You must be signed in to change notification settings - Fork 182
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
Unable to promote to admin "module Ret.Repo is not available" #713
Comments
Maybe try |
Ah, it worked, wonderful, thanks @vincentfretin! Why though? I had a brief look at iex and mix but don't actually understand. |
This is more or less for the interpreter iex to know where the project files are located. That's the command you use in any phoenix project, I didn't really dig it why. Here what gpt-4 answers: In a Phoenix project, the command iex -S mix is used to start the Interactive Elixir (IEx) shell with your application and its dependencies loaded. This command is particularly useful for running your Phoenix application while also having an interactive session that can be used for debugging, running tasks, or directly interacting with your application's code and functions. Here's a breakdown of the command: iex: This is the Interactive Elixir shell, allowing you to run Elixir expressions in a REPL (Read-Eval-Print Loop). It's a great tool for testing small snippets of Elixir code, exploring functionalities, and debugging. -S: This switch tells iex to run a script. In the context of this command, it's used to invoke the mix script, which is Elixir's build tool. mix: Mix is a build tool that ships with Elixir and provides tasks for creating, compiling, testing your application, managing its dependencies, and much more. It's an essential part of the Elixir ecosystem and is used for project management. When you run iex -S mix in the context of a Phoenix project, it compiles your project (if necessary), starts the application along with its dependencies, and then launches the IEx shell. This allows you to interact with your running Phoenix application from the IEx prompt. For example, you can query Ecto models, call functions defined in your modules, etc., all while the application is running. It's a powerful feature for development and debugging purposes. This command is particularly useful because it lets you test changes in real-time, inspect state, and interact with the application's processes. It's a common practice during development to run this command in the terminal to have a live session for experimentation and debugging while developing a Phoenix application. |
As recommended by https://github.com/mozilla/hubs-compose?tab=readme-ov-file#admin-panel-access I tried to run
Ret.Account |> Ret.Repo.all() |> Enum.at(0) |> Ecto.Changeset.change(is_admin: true) |> Ret.Repo.update!()
after logging in with a first user.Unfortunately I'm getting
The text was updated successfully, but these errors were encountered: