Codename-404
Mix command works in terminal but doesn't compile with "mix new my_project"
Hi, I am new to elixir, tried several ways to install elixir on my Mac M1.
Everything works on terminal or if I just create a test.exs file.
But when I want to add Phoenix or even with a “mix new my_project”, it always gives me this error below,
Compiling 1 file (.ex)
== Compilation error in file lib/learning.ex ==
** (ArgumentError) could not call Module.put_attribute/3 because the module Learning.MixProject is already compiled
(elixir 1.15.7) lib/module.ex:2310: Module.assert_not_readonly!/2
(elixir 1.15.7) lib/module.ex:2007: Module.__put_attribute__/5
lib/learning.ex:2: (module)
I tried with homebrew, with asdf. Can anyone assist me solving this issue?
Looking forward to get started with elixir ~
Marked As Solved
dimitarvp
Change that. Use native ARM homebrew.
Also Liked
Codename-404
That solved the issue. Thank you ~
All I had to do it, get out of inner session CTRL + D,
reinstall homebrew for amr64,
install elixir.
Thank you ~
1
dimitarvp
It’s a common gotcha. Glad you solved it.
1
Popular in Questions
Credo is smart enough to check for (something like) this:
assert length(the_list) == 0
with this response:
Checking if an enum is empt...
New
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
Hi there, I'm working through my first release with elixir/phoenix. I've built a release with distillery and found that it crashes when I...
New
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set?
Thanks.
New
I have a list say
x = ["23gh", "56kh", "97mh"]
I would like to pass each element to Val in each iteration.
Say, in iteration 1 -------...
New
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
Hey all,
I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
Hi everyone!
I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
I’ve been re-reading swift book again and noticed that multiline strings there don’t have a trailing line break, unlike in elixir
iex(2)...
New
Other popular topics
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
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
New
You’re a programmer, so you don’t need spoon feeding with the conventional drivel about “this is an integer.” No. You need to know what’s...
New
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
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
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine)
This is a plugin that adds support for Elixir to JetBrains IntelliJ...
New
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
I will often find my self writing things similar to:
case some_value do
nil -> something()
"" -> something()
_ -> someth...
New
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum.
...
New
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New







