braindeaf

braindeaf

Need help with examples in chapter 2 of GraphQL APIs in Elixir with Absinthe book

Just opening GraphQL API in Elixir with Absinthe and realised I need Elixir 1.5.0 / OTP 20 to get the examples running. Is there an up to date version of the sample code anywhere or is there a surefire way of getting OTP 20 running on MacOSX 12.5.1

I’m using ASDF and it’s just spitting out the following and I am just staring blankly. I am not even sure I can get it running under Monterey.

The asdf_20.3.8.26 build has been deleted
Extracting source code
Building Erlang/OTP 20.3.8.26 (asdf_20.3.8.26), please wait...
Build failed.
configure: error: 

  You are natively building Erlang/OTP for a later version of MacOSX
  than current version (12.5.1). You either need to
  cross-build Erlang/OTP, or set the environment variable
  MACOSX_DEPLOYMENT_TARGET to 12.5.1 (or a lower version).


make: *** No rule to make target `is_cross_configured'.  Stop.
make: *** No rule to make target `all'.  Stop.

Please see /Users/rl/.asdf/plugins/erlang/kerl-home/builds/asdf_20.3.8.26/otp_build_20.3.8.26.log for full details.

Failed at the first hurdle of Chapter 2. Boooo

Many thanks

RobL

Most Liked

dimitarvp

dimitarvp

Doesn’t the code work with the latest Erlang and Elixir?

kokolegorille

kokolegorille

Yes it does… last time I tried, I just started a new project, and added latest version of Absinthe + deps.

I also added dataloader, and could proceed with the code.

slouchpie

slouchpie

What the previous two posts are saying is that you can probably edit .tool-versions file in the repository. Change it to something like this:

elixir 1.14.0-otp-25
erlang 25.1.1

Then run asdf install again and start from the beginning (get deps, compile, etc)

Where Next?

Popular in Questions Top

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
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
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
mgjohns61585
Could someone help me? I’m making my first elixir program, number guessing game. I can’t figure out how to convert the user’s guess from ...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
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
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

Other popular topics Top

sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
lanycrost
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

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement