Go to lib/myapp/application.ex
, comment out the following lines:
children = [
# Start the Ecto repository
# Myapp.Repo,
...
]
Then look for config/dev.exs
and comment out the following lines:
# Configure your database
# config :myapp, Myapp.Repo,
# username: "",
# password: "",
# database: "myapp_dev",
# hostname: "localhost",
# show_sensitive_data_on_connection_error: true,
# pool_size: 10
And to disable for production deployment, go to config/prod.secret.exs
, comment out the following lines:
# database_url =
# System.get_env("DATABASE_URL") ||
# raise """
# environment variable DATABASE_URL is missing.
# For example: ecto://USER:PASS@HOST/DATABASE
# """# config :krypto, Krypto.Repo,
# # ssl: true,
# url: database_url,
# pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10")
That’s all! The errors should stop appearing.
And if you need to re-enable Ecto again, just uncomment all these lines!