pedromvieira

pedromvieira

It fixed Erlang / Elixir, but I couldnt install correctly Phoenix.
Did you succeed?
Some of my deps like apartmentex that depends on ecto can’t compile.

I did try normal url and local file to install Phoenix.
Erlang, Nodejs & Elixir last versions from ASDF. (including that PR)

Mac OS High Sierra last beta.

Showing Posts 1 to 9

NobbZ

NobbZ

What command do you use to install Phoenix and what error messages do you get? What are your erlang and elixir versions?

pedromvieira

pedromvieira OP

Erlang 20 with RP.
Elixir 1.5.1.

Remote
mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez
Are you sure you want to replace it with “https://github.com/phoenixframework/archives/raw/master/phx_new.ez”? [Yn] Y
* creating .asdf/installs/elixir/1.5.1/.mix/archives/phx_new

ls .asdf/installs/elixir/1.5.1/.mix/archives/phx_new/phx_new/ebin/
Elixir.Mix.Tasks.Local.Phoenix.beam Elixir.Phx.New.Generator.beam
Elixir.Mix.Tasks.Local.Phx.beam Elixir.Phx.New.Project.beam
Elixir.Mix.Tasks.Phoenix.New.beam Elixir.Phx.New.Single.beam
Elixir.Mix.Tasks.Phx.New.Ecto.beam Elixir.Phx.New.Umbrella.beam
Elixir.Mix.Tasks.Phx.New.Web.beam Elixir.Phx.New.Web.beam
Elixir.Mix.Tasks.Phx.New.beam phx_new.app
Elixir.Phx.New.Ecto.beam

Local
mix archive.install ~/phx_new.ez

No mix phoenix tasks populated in mix help.

OvermindDL1

OvermindDL1

I do hope you mean mix help | grep phx tasks? It is phx.blah not phoenix.blah. ^.^

NobbZ

NobbZ

This is what I get, its funtoo linux though…

$ mix help | egrep "phx|phoenix"
mix local.phoenix     # Updates Phoenix locally
mix local.phx         # Updates the Phoenix project generator locally
mix phoenix.new       # Creates a new Phoenix v1.3.0 application
mix phx.new           # Creates a new Phoenix v1.3.0 application
mix phx.new.ecto      # Creates a new Ecto project within an umbrella project
mix phx.new.web       # Creates a new Phoenix web project within an umbrella project

Of course you need to make sure that you are actually using the correct elixir version!

In your case I’d try this to be sure:

$ ASDF_ELIXIR_VERSION=1.5.1 mix help | egrep "phoenix|phx"

If that does really print nothing, please do show the full output of ASDF_ELIXIR_VERSION=1.5.1 mix help and which mix!

pedromvieira

pedromvieira OP

The error is occurring both on new phx apps and old ones.

mix compile
==> apartmentex
Compiling 5 files (.ex)

== Compilation error in file lib/apartmentex/migrations_path_builder.ex ==
** (CompileError) lib/apartmentex/migrations_path_builder.ex:2: cannot import Mix.Ecto.build_repo_priv/1 because it is undefined or private
    (elixir) src/elixir_import.erl:77: :elixir_import.calculate/6
    (elixir) src/elixir_import.erl:18: :elixir_import.import/4
could not compile dependency :apartmentex, "mix compile" failed. You can recompile this dependency with "mix deps.compile apartmentex", update it with "mix deps.update apartmentex" or clean it with "mix deps.clean apartmentex"
pedromvieira

pedromvieira OP

This command output works:

ASDF_ELIXIR_VERSION=1.5.1 mix help | egrep "phoenix|phx"
mix local.phoenix      # Updates Phoenix locally
mix local.phx          # Updates the Phoenix project generator locally
mix phoenix.gen.html   # Generates controller, model and views for an HTML based resource
mix phoenix.new        # Creates a new Phoenix v1.3.0 application
mix phoenix.server     # Starts applications and their servers
mix phx.digest         # Digests and compresses static files
mix phx.digest.clean   # Removes old versions of static assets.
mix phx.gen.channel    # Generates a Phoenix channel
mix phx.gen.context    # Generates a context with functions around an Ecto schema
mix phx.gen.embedded   # Generates an embedded Ecto schema file
mix phx.gen.html       # Generates controller, views, and context for an HTML resource
mix phx.gen.json       # Generates controller, views, and context for a JSON resource
mix phx.gen.presence   # Generates a Presence tracker
mix phx.gen.schema     # Generates an Ecto schema and migration file
mix phx.gen.secret     # Generates a secret
mix phx.new            # Creates a new Phoenix v1.3.0 application
mix phx.new.ecto       # Creates a new Ecto project within an umbrella project
mix phx.new.web        # Creates a new Phoenix web project within an umbrella project
mix phx.routes         # Prints all routes
mix phx.server         # Starts applications and their servers
NobbZ

NobbZ

Then create properly filled .tool-versions file in your project root as described in asdfs README:

https://github.com/asdf-vm/asdf#the-tool-versions-file

Maybe you can also set a global version as you require it via asdf global elixir 1.5.1.

NobbZ

NobbZ

Also let me please say, that asdf is not a packagemanager like apt or brew which installs elixir or something else in the required version, its a tool that manages environments and therefore need to be learned to be able to use it correctly. Its much more like rbenv, rvm, rustup, evm, etc…

But if one has mastered it, one can use it to run tests automatically against mutliple Erlang/Elixir-Version-Combinations without having to rely or configure external CI Services. Therefore you can get a level of confidence your code is correct for all targeted environments even before pushing it to the public.

AlchemistCamp

AlchemistCamp

I made an asdf quickstart tutorial a while back that goes through installing languages and Phoenix. I still use it when setting up new machines.

It might help as a quick check to see if there’s something you’re missing.

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New

Latest on Elixir Forum

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews