How to Disable Ecto in Elixir Phoenix After Project Creation

Photo by Giammarco Boscaro on Unsplash

If you have created an Elixir Phoenix project without the --no-ecto flag, you will see a lot of warnings and errors regarding databases and ecto down the line.

Here’s how you can disable it.

Go to lib/myapp/application.ex, comment out the following lines:

Then look for config/dev.exs and comment out the following lines:

And to disable for production deployment, go to config/prod.secret.exs, comment out the following lines:

That’s all! The errors should stop appearing.

And if you need to re-enable Ecto again, just uncomment all these lines!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store