theo09

theo09

I wish to use Ecto for a project but when I realize the command mix ecto.create I have the following error Invalid Elixir version requirement in mix.exs file. However, I have the same version in this file as that at present used. I tried with of other one versions but the error is always present. Can you help me?

Showing Posts 1 to 10

NobbZ

NobbZ

Can you please provide the exact output of the mix ecto.create run? Also the content of your mix.exs might help us.

theo09

theo09 OP

Hy NobbZ, thanks for your answer.
This is the exact output :
12

theo09

theo09 OP

And this is the Mix.exs file :

NobbZ

NobbZ

Dont use sudo!

root will probably see a different version of elixir than theo does in his current environment.

kokolegorille

kokolegorille

Why do You need sudo to run mix ecto.create?

Running with sudo change your identity, it changes also asdf setup because it is on a per user setup I think.

You could try to really check this.

$ sudo asdf current elixir
NobbZ

NobbZ

Usually asdf is installed “per user”, so I assume that root won’t even see the asdf script/function (however its implemented).

NobbZ

NobbZ

PS: Please do not post screenshots of code or your shell, use proper copy and paste to get the content in the post and then use either 4 spaces indentation per line or wrap it into triple backticks (```) to mark the code block as such as you are used to it from your favorite markdown dialect.

This makes reading and especially copying them a lot easier (and uses less bandwith of my mobile dataplan).

NobbZ

NobbZ

Oh, and you will probably need to sudo rm -rf _build deps before using mix without sudo again to “repair” ownerships and permissions.

theo09

theo09 OP

Thanks guy, you were right it was a problem at sudo. However, I have another error at the same stage and I do not know what to do.
Error message :
(Mix) The database for Farmbot.Repo couldn’t be created: an exception was raised:
** (RuntimeError) Connect raised a KeyError error. The exception details are hidden, as
they may contain sensitive data such as database credentials.

    (elixir) lib/keyword.ex:377: Keyword.fetch!/2
    (postgrex) lib/postgrex/protocol.ex:610: Postgrex.Protocol.auth_md5/4
    (postgrex) lib/postgrex/protocol.ex:504: Postgrex.Protocol.handshake/2
    (db_connection) lib/db_connection/connection.ex:135: DBConnection.Connection.connect/2
    (connection) lib/connection.ex:622: Connection.enter_connect/5
    (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3

Have you an idea of what can I do ?

kokolegorille

kokolegorille

You should check your credentials. It is located in the config folder of your farmbot application.

You should match that the user specified is allowed to use database.

In case not… You might look at PostgreSQL: Documentation: 9.5: CREATE USER

Where Next? Top

Trending in Questions Top

katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
achenet
Hello, I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind. However, when I launch mix phx.server, I get an error...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
Cxx-mlr
I’m working on a small exercise involving update_in/3, and I came up with this solution: data = %{ name: "Periodic Table", category:...
New
ChrisAmelia
I’ve got trouble wrapping my head around the order in which functions are called in this snippet (from Phoenix’s authentication): toke...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews