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.