Not connecting to database since downloading ASDF

Try to update all your package if it doesn’t break your app.

Before you do that you can also share your mix.exs for others here to llok over and make sure that you wouldn’t have any compatibility issue, thanks to the upgrade.

Okay I will try and upgrade

  defp deps do
    [
      {:phoenix, "~> 1.4.0"},
      {:phoenix_pubsub, "~> 1.0"},
      {:phoenix_html, "~> 2.10"},
      {:ecto_sql, "~> 3.0"},
      {:google_api_storage, "~> 0.0.1"},
      {:phoenix_ecto, "~> 4.0"},
      {:jason, "~> 1.1"},
      {:postgrex, ">= 0.0.0"},
      {:phoenix_live_reload, "~> 1.0", only: :dev},
      {:gettext, "~> 0.11"},
      {:plug_cowboy, "~> 2.0"},
      {:phoenix_live_view, github: "phoenixframework/phoenix_live_view"},
      {:plug, "~> 1.7"},
      {:distillery, "~> 1.5", runtime: false},
      {:sweet_xml, "~> 0.6.5"},
      {:csv, "~> 2.3"},
      {:guardian, "~> 1.0"},
      {:cors_plug, "~> 1.5"},
      {:timex, "~> 3.5.0"},
      {:httpoison, "~> 1.0"},
      {:comeonin, "~> 4.0"},
      {:poison, "~> 3.1"},
      {:bcrypt_elixir, "~> 0.12"},
      {:phoenix_inline_svg, "~> 1.1"},
      {:quantum, "~> 2.3"},
      {:gcs_signer, "~> 0.2.0"},
      {:phoenix_gon, "~> 0.4.0"},
      {:goth, "~> 0.8.0"}
    ]
  end

Do you use the mysql adapter for ecto?

Also I will logon my Linux pc and compare my config with your in 4 minutes i should be able to achieve that.

Updating my deps breaks things by throwing this error

==> crontab
warning: the dependency :crontab requires Elixir "~> 1.7" but you are running on v1.6.6
Compiling 7 files (.ex)

== Compilation error in file lib/crontab/cron_expression.ex ==
** (ArgumentError) expected the typedoc attribute to contain a binary, a boolean, or nil, got: [deprecated: "Use Crontab.CronExpression.min_max/1 instead"]
   (elixir) lib/module.ex:1681: Module.preprocess_attribute/2
   (elixir) lib/module.ex:1642: Module.put_attribute/5
   lib/crontab/cron_expression.ex:22: (module)
   (stdlib) erl_eval.erl:680: :erl_eval.do_apply/6
could not compile dependency :crontab, "mix compile" failed. You can recompile this dependency with "mix deps.compile crontab", update it with "mix deps.update crontab" or clean it with "mix deps.clean crontab"

I am gonna revert back to the old deps because Im not sure if this is a dependency issue I am going go try and just update phoenix.

My mix.exs for Rumbl project with latest phoenix

defmodule Rumbl.MixProject do
  use Mix.Project

  def project do
    [
      app: :rumbl,
      version: "0.1.0",
      elixir: "~> 1.5",
      elixirc_paths: elixirc_paths(Mix.env()),
      compilers: [:phoenix, :gettext] ++ Mix.compilers(),
      start_permanent: Mix.env() == :prod,
      aliases: aliases(),
      deps: deps()
    ]
  end

  # Configuration for the OTP application.
  #
  # Type `mix help compile.app` for more information.
  def application do
    [
      mod: {Rumbl.Application, []},
      extra_applications: [:logger, :runtime_tools]
    ]
  end

  # Specifies which paths to compile per environment.
  defp elixirc_paths(:test), do: ["lib", "test/support"]
  defp elixirc_paths(_), do: ["lib"]

  # Specifies your project dependencies.
  #
  # Type `mix help deps` for examples and options.
  defp deps do
    [
      {:phoenix, "~> 1.4.11"},
      {:phoenix_pubsub, "~> 1.1"},
      {:phoenix_ecto, "~> 4.0"},
      {:ecto_sql, "~> 3.1"},
      {:postgrex, ">= 0.0.0"},
      {:phoenix_html, "~> 2.11"},
      {:phoenix_live_reload, "~> 1.2", only: :dev},
      {:gettext, "~> 0.11"},
      {:jason, "~> 1.0"},
      {:plug_cowboy, "~> 2.0"},
      {:pbkdf2_elixir, "~> 1.0"}
    ]
  end

  # Aliases are shortcuts or tasks specific to the current project.
  # For example, to create, migrate and run the seeds file at once:
  #
  #     $ mix ecto.setup
  #
  # See the documentation for `Mix` for more info on aliases.
  defp aliases do
    [
      "ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
      "ecto.reset": ["ecto.drop", "ecto.setup"],
      test: ["ecto.create --quiet", "ecto.migrate", "test"]
    ]
  end
end

You need to upgrade your elixir version as well

But my image and my app are for elixir 1.6.6 not 1.7

I can try to run it on 1.7 its worth a shot.

You will have to rebuild your project for production

My elixir version is

elixir -v
Erlang/OTP 22 [erts-10.4] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [hipe]

Elixir 1.9.4 (compiled with Erlang/OTP 22)

Also one thing i learned is to go with the latest stable because a lot of bugs get fixed from the previous versions.

Try to upgrade only ecto_sql to 3.1 and see if the repo will start

1 Like

I am installing erlang 22 and elixir 1.9.4 now and I will give those a try after they install

Also it seems that if you upgrade phoenix to the latest version then you get

{:ecto_sql, "~> 3.1"},

Do you want to compare the rest of the files?(application.ex, dev.exs)

Also does Repo work in iex shell?

alias Your_App.Context.User
alias Your_App.Repo
Repo.all(User)

I upgraded elixir and erlang versions and now things have changed. for some reason my webpack stopped running so the app runs but no of the assets compile, but the app is running and isnt throwing that database error anymore.

OK I can share my webpack config if you want

I just had to run NPM install in my assets and now Its working!! I am going go try and deploy and hopefully all that goes well but thank you for your help!!

Glad I could help.Also don’t forget to mark solved after the deploy