vonH
I am trying to create an ecto project based on sqlite, first with sqlite_ecto, GitHub - jazzyb/sqlite_ecto: SQLite3 adapter for Ecto · GitHub which conflicts with ecto ~> 2.0, and now with sqlite_ecto2, GitHub - elixir-sqlite/sqlite_ecto2: Sqlite3 adapter for Ecto 2.2.x · GitHub
I get to the stage where I am required to do a mix deps.compile sqlite_ecto2
vonhabsi@ac02:~/DevProjects/learnphoenix/customers$ mix deps.compile sqlite_ecto2
==> sqlite_ecto2
Compiling 9 files (.ex)
== Compilation error on file lib/sqlite_db_connection/query.ex ==
** (ArgumentError) DBConnection.Query is not available
(elixir) lib/protocol.ex:69: Protocol.assert_protocol!/2
lib/sqlite_db_connection/query.ex:33: (file)
(elixir) lib/kernel/parallel_compiler.ex:117: anonymous fn/4 in Kernel.ParallelCompiler.
spawn_compilers/1
could not compile dependency :sqlite_ecto2, "mix compile" failed. You can recompile this dep
endency with "mix deps.compile sqlite_ecto2", update it with "mix deps.update sqlite_ecto2"
or clean it with "mix deps.clean sqlite_ecto2"
vonhabs@ac02:~/DevProjects/learnphoenix/customers$
What is missing here? Could it be something in the erlang configuration. Am I missing some libraries or some build related tools?
PS. What do you do if you don’t have the permissions to add the tags you want?
Trending in Questions
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
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
Hi everyone.
My team and I have been working on a fairly modest app based around video streaming and chat, but we’ve landed a customer t...
New
I really like the adapter patterns that ecto, nebulex, waffle, etc. use and would love find something similar for a key management servic...
New
Hello folks!
So at work, we are seeing some situations where we have to define some “fixed” strings that are used across the codebase in...
New
I’m working on a small exercise involving update_in/3, and I came up with this solution:
data = %{
name: "Periodic Table",
category:...
New
How Can I Optimise Compile Time Dependencies
I have been building an elixir application for about 2 years now. Many modules and files ha...
New
Other Trending Topics
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
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
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
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #ai
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #security
- #metaprogramming










Showing Posts 10 to 1- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
scouten
Sounds good. Keep me posted!
vonH
Sorry for the confusion. The original question should have referred to your repo (it was a copy and paste error), and I have changed it now.
I couldn’t get the one from hex.pm to compile after I added to my deps. To be fair I am new to elixir and some of my settings may have been wrong.
I have been able to compile it from github directly and I will test in a project later.
Thanks
scouten
FYI if you look at the Travis CI build settings for sqlite_ecto2 (https://github.com/scouten/sqlite_ecto2/blob/master/.travis.yml), you’ll see that I am verifying the build against the following:
scouten
Hi @vonH (and everybody), there are two different sqlite_ecto libraries.
The one you’ve linked to GitHub - jazzyb/sqlite_ecto: SQLite3 adapter for Ecto · GitHub is for Ecto version 1.x and appears to be no longer maintained. (There have been no commits in over a year now.)
I started a new project to updated this to Ecto version 2.x and which is located at GitHub - elixir-sqlite/sqlite_ecto2: Sqlite3 adapter for Ecto 2.2.x · GitHub. This version is in a prerelease state. It’s believed to be correct and working, but hasn’t had enough stress testing for me to call it a proper 2.0 release yet.
If you are still having trouble with compiling sqlite_ecto2, please file an issue on GitHub (Issues · elixir-sqlite/sqlite_ecto2 · GitHub). I won’t be able to look at it today, but I should have time over the weekend to follow up. A test repo that demonstrates the problem would be very helpful.
xlphs
I’ve been using
{:sqlite_ecto, "~> 1.1"}just fine, got it to work on windows, linux, and mac. What is your build environment? Sqlite requires C compiler or at least the dynamic library installed. I just started building sqlite_ecto2 and it’s stuck atpc(port compiler) for like half an hour now using up 99% CPUUpdate: this is very odd, mix deps.compile is totally stuck, I went into esqlite folder and ran rebar compile which worked (compiled esqlite3_nif.so) so something else is wrong. Will look into this later today.
OvermindDL1
Absolutely what @tme_317 said, the old sqlite_ecto library is not for ecto2, but rather for ecto1, use the new linked sqlite_ecto2 library and it works fine (it is still in dev but just working on final bugs last I saw, its basically solid and done now).
tme_317
I’m not sure about GitHub - jazzyb/sqlite_ecto: SQLite3 adapter for Ecto · GitHub but the newest GitHub - elixir-sqlite/sqlite_ecto2: Sqlite3 adapter for Ecto 2.2.x · GitHub has been working great for me with the latest ecto 2.1.4.
If you add
{:sqlite_ecto2, "~> 2.0.0-dev.2"}to your deps in mix.exs then runmix deps.getit will pull in the other dependencies automatically (such as ecto, esqlite, sqlitex). Follow that withmix deps.compileand it should compile fine.There are some caveats listed in the readme for
sqlite_ecto2to be aware of such as compatible Erlang versions, etc.idi527
Oh, I see.
Just in case, there are many ways for programs in different languages to interact, for example, through protocols, like thrift [0], or through messaging systems, like zeromq [1].
[0] https://thrift.apache.org
[1] http://zeromq.org
vonH
The real problem here is the cryptic compiler messages. It is hard to tell whether the code itself is not compatible, or there is some additional libraries or configuration missing.
It has to be a standard SQL database as it will interact with other non Elixir programs. If anything I can switch to Postgres. It isn’t that critical now as I am at the learning stage, but it will be good for Ecto 2.0 to work with sqlite. As from this thread - Why would I choose Elixir as a general purpose programming language? - #10 by vonH - I am trying to use Elixir as a general purpose programming language independently of the Erlang/BEAM ecosystem, and full blown Erlang database systems and SQL server databases are not always appropriate there.
idi527
It seems like sqlite adapter (ecto-2.0 branch as well) for ecto is not compatible with ecto 2.0 [0][1]
If you need a lightweight database, may I suggest you use mnesia? It has an ecto adapter which is compatible with ecto 2.0 [2]. In case you don’t like it, there are other wrappers around mnesia, kvs [3] and amnesia [4]. And finally, you can use mnesia directly via
:mnesiamodule.[0] GitHub - elixir-ecto/ecto: A toolkit for data mapping and language integrated query. · GitHub
[1] sqlite_ecto/mix.exs at master · jazzyb/sqlite_ecto · GitHub
[2] GitHub - Nebo15/ecto_mnesia: Ecto adapter for Mnesia Erlang term database. · GitHub
[3] GitHub - synrc/kvs: KVS: xNVMe SSD Key-Value Store Abstraction Layer (SNIA) · GitHub
[4] GitHub - meh/amnesia: Mnesia wrapper for Elixir. · GitHub