alxvallejo

alxvallejo

Asdf: Switching between projects is breaking my system

I have two separate Phoenix projects.

The first uses Elixir 1.4 and the second i’m using 1.9.

I’m using asdf to set the local versions of each but noticed that I had accidentally set the global version as 1.9 on the second project. I tried setting the global version back to 1.4 and then tried deleting the .tool-versions file at /home/user, but I still get this crash report.

Regardless, I’m hitting an error on my first project now. Immediately when I try to run the project I hit this crash report on the CLI. I’ve tried deleting the _build and the deps. Even if i just run mix -v I get the crash report.

iex -S mix phx.server
Erlang/OTP 23 [DEVELOPMENT] [erts-10.6.2] [source-cf6cf5e5f8] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]

=SUPERVISOR REPORT==== 15-Jan-2020::16:33:01.971915 ===
    supervisor: {local,'Elixir.Logger.Supervisor'}
    errorContext: start_error
    reason: noproc
    offender: [{pid,undefined},
               {id,'Elixir.Logger.ErrorHandler'},
               {mfargs,
                   {'Elixir.Logger.Watcher',watcher,
                       [error_logger,'Elixir.Logger.ErrorHandler',
                        {true,false,500}]}},
               {restart_type,permanent},
               {shutdown,5000},
               {child_type,worker}]

=CRASH REPORT==== 15-Jan-2020::16:33:01.973889 ===
  crasher:
    initial call: application_master:init/4
    pid: <0.93.0>
    registered_name: []
    exception exit: {{shutdown,
                         {failed_to_start_child,'Elixir.Logger.ErrorHandler',
                             noproc}},
                     {'Elixir.Logger.App',start,[normal,[]]}}
      in function  application_master:init/4 (application_master.erl, line 138)
    ancestors: [<0.92.0>]
    message_queue_len: 1
    messages: [{'EXIT',<0.94.0>,normal}]
    links: [<0.92.0>,<0.44.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 376
    stack_size: 28
    reductions: 192
  neighbours:

=INFO REPORT==== 15-Jan-2020::16:33:01.975951 ===
    application: logger
    exited: {{shutdown,
                 {failed_to_start_child,'Elixir.Logger.ErrorHandler',noproc}},
             {'Elixir.Logger.App',start,[normal,[]]}}
    type: temporary

Most Liked

outlog

outlog

elixir 1.4 or elixir 1.4.5 (which supports otp20..) ?

use otp 20.3.8.23 and elixir 1.4.5 - and remember rm -rf _build/ before..

also pin the elixir 1.9 project to a more recent otp - like latest 22.x

bonus tip: You’ll want to use the specific elixir/otp builds eg asdf install elixir 1.4.5-otp-20 and asdf install elixir 1.9.4-otp-22 - to enable all latest elixir features..

NobbZ

NobbZ

Do you have elixir-1.9 or elixir-1.9-otp-22 or something similar?

No, don’t delete it. Keep it.

This means the same as ">= 0.5.0 && < 1.0.0", so 0.8 is in range. If that does not work for your project, you need to add further constraints.

If you had a lockfile from previously, than the locked version from earlier would have been used, unless you unlock it. But in that case, you would probably not have concluded that the issue were related to having a different elixir version in a different project.

outlog

outlog

you have a .tool-versions in each of the projects right?

eg cat /home/user/path_to/first_project/.tool-versions should have elixir 1.4 in it?

try rm -rf _build/ inside first project - maybe you accidently build it with elixir 1.9

Where Next?

Popular in Questions Top

skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
yawaramin
In the Dialyzer docs ( dialyzer — OTP 29.0.2 (dialyzer 6.0.1) ), there is a way to turn off a specific warning for a function: -dialyzer...
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29377 241
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 41539 114
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
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
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39297 209
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New

We're in Beta

About us Mission Statement