lorefnon

lorefnon

Number of issues experienced trying to install Phoenix

I remember trying out elixir and phoenix about a year ago and was surprised to discover the pleasant developer experience reminiscent of the ruby ecosystem.

I couldn’t focus much on elixir over the last year, due to other commitments. A day ago I wanted to try out phoenix+elixir for a new application, but discovered that the getting started experience is no longer as pleasant.

I understand that the scope of this chat is somewhat vague and many things might not be directly related to this phoenix itself, but I wanted to highlight the issues I faced and see if I can help out with any of them (in case not already being addressed elsewhere).

To start a new application I ran:

mix phx.new cresman --no-brunch

This generates the scaffold. Now when I run mix ecto.create I get an error:

warning: retrieving the :adapter from config files for Cresman.Repo is deprecated.
Instead pass the adapter configuration when defining the module:

    defmodule Cresman.Repo do
      use Ecto.Repo,
        otp_app: :cresman,
        adapter: Ecto.Adapters.Postgres

When I make this change in repo.ex this fails again because Ecto.Adapters.Postgres isn’t compiled. So after some exploration it would appear that this module is provided by ecto_sql package.

So I add ecto_sql package to mix.exs, but now mix deps.get fails to locate the package.

Interestingly, I am prompted to add an rc version where as the github repo seems to indicate that a 3.0.0 has been published.

When I add the 3.0-pre as a dependency, I am finally able to run mix ecto.create.

But now mix phx.server won’t start because plug_cowboy is supposed to be used as a dependency instead of cowboy.

Now finally once I go and add plug_cowboy as a dependency, I am able to run the dev server.

In the default welcome page that is served, the guides link points to a non-existent page. The mailing list link points to a google groups page that has now been deprecated and filled with spam.


I hope this post doesn’t come across as an angry rant - that is not the intent. However I do believe it would help the popularity of the ecosystem if the most popular framework works out of the box.

Marked As Solved

chrismccord

chrismccord

Creator of Phoenix

Hi Lorefnon,

This is unfortunate timing as we are prepping a Phoenix 1.4 final release, Ecto 3.0.0 just went final, and we accidentally pushed a phoenix_ecto version which broke 1.3 apps (which has now been fixed, and retired). 1.3 apps should be fixed now, but if you are just now jumping back into things, I recommend hopping on the 1.4 RC as we should be in a final release soon:

$ mix archive.uninstall phx_new
$ mix archive.install hex phx_new 1.4.0-rc.3

Things should settle down soon. Thanks for bearing with us!

Also Liked

axelson

axelson

Scenic Core Team

Hmm, following the current phoenix guides (with phx.new for Phoenix v1.3.4)

I’m running into an issue as well. Looks like phoenix_ecto version 3.5.0 is being pulled in, even though it is listed as retired on hex: phoenix_ecto | Hex

jason@Jasons-MacBook-Pro-2 /p/t/hello> cat mix.lock |grep ecto
  "ecto": {:hex, :ecto, "3.0.0", "059250d96f17f9c10f524fcb09d058f566691343e90318a161cf62a48f3912a9", [:mix], [{:decimal, "~> 1.5", [hex: :decimal, optional: false]}, {:jason, "~> 1.0", [hex: :jason, optional: true]}, {:poison, "~> 2.2 or ~> 3.0", [hex: :poison, optional: true]}]},
  "phoenix_ecto": {:hex, :phoenix_ecto, "3.5.0", "f72ec302589988698c096da7e8647e917fa2bb2f861c0c3739fc9d95708bacec", [:mix], [{:ecto, "~> 2.2 or ~> 3.0", [hex: :ecto, optional: false]}, {:phoenix_html, "~> 2.9", [hex: :phoenix_html, optional: true]}, {:plug, "~> 1.0", [hex: :plug, optional: false]}]},

I would expect ecto 2.2.11 with phoenix_ecto 3.4.0 to be pulled in. Not sure what the issue is. Also not sure why I don’t get a retired package warning when I run mix deps.get.

@lorefnon thanks for bringing this up! It looks like a temporary regression because Phoenix 1.4 is in RC and a new major version of Ecto (that has some minor breaking changes) was released Yesterday. I’m sure we can get this sorted out soon.

lorefnon

lorefnon

Oh I see. Unfortunate timing on my part.

axelson

axelson

Scenic Core Team

The installation instructions work great for me now! Looks like the fix was to push phoenix_ecto 3.6.0 which also matches 3.2. Thanks for fixing that.

Also does anyone know why a retired package is selected to be installed? I would expect it not to be as long as it’s not specified in the mix.lock and there’s another valid version that could be used instead.

Where Next?

Popular in Questions Top

hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: The documentation above suggests that while ...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New

Other popular topics Top

lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

Latest on Elixir Forum

We're in Beta

About us Mission Statement