qtheninja

qtheninja

New to elixir and phoenix and was trying to do a full life cycle on a simple crud. I’m having the darndest time getting Elixir to work with distillery/edeliver.

I’m using a 16.04 Ubuntu server. I can build manually and server it from the server via SSH. After some sleuthing. 1.7 and Distillery do not play well together from my understanding.

So I tried to use asdf and kiex for versioning elixir. Every time I attempt it says that ‘mix’ isn’t really a thing (even though it is on the shell when I try it.

So I was just seeing what is a good way to install elixir version 1.6 specifically since I’m having a heck of time tackling the other alternatives I’ve found on the net. Thanks.

Showing Posts 1 to 10

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

1.7 and distillery work great, you just need to use distillery 2.0.

Setting that aside, it sounds like when you installed asdf you didn’t add its paths to your bash profile, OR you didn’t set a global version.

cdegroot

cdegroot

Just asdf should be enough. Follow the installation instructions, then

asdf plugin-add elixir
asdf install elixir 1.6.5

should do the trick. Usually I also add the Erlang plugin and manage OTP the same way (and an even dozen other languages as well, all stashed in my ~/.tool-versions so that a single cd ~; asdf install will sync a new machine with the languages and versions I use at any given time).

qtheninja

qtheninja OP

Just tried 1.7 and Distillery 2.0 I continue to get the same error

“** (Mix.Releases.Config.LoadError) could not load release config rel/config.exs
** (UndefinedFunctionError) function Mix.Config.Agent.start_link/0 is undefined (module Mix.Config.Agent is not available)”

which according to Mix.Config.Agent use is incompatible with Elixir master · Issue #431 · bitwalker/distillery · GitHub is related to versioning. Unless I’m doing something wrong (very possible still pretty new to Elixir)

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

If you do elixir --version within that project what do you get? What’s the output of mix deps|grep distillery?

qtheninja

qtheninja OP

Added asdf per instructions. Added the plugin for elixir and otp. Did the installs and added a global.

On the server it seems to work as I can obtain elixir version (1.6.5) via asdf and I can load the application manually via SSH. So I’m a little thrown for a loop.

Maybe I’ll start a clean build just phx.new and try to deploy that and see how it works.

qtheninja

qtheninja OP

for elixir version:
Erlang/OTP 21 [erts-10.0] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [hipe]
Elixir 1.6.5 (compiled with OTP 19)

for mix deps|grep distillery:

My local machine has=>

  • distillery 2.0.2 (Hex package) (mix)
    locked at 2.0.2 (distillery) 58e15f67

My server has =>

  • distillery 1.5.3 (Hex package) (mix)
    locked at 1.5.3 (distillery) 58e15f67

So. I re-compiled it and the release worked. So this helped as I have spent a few days of my free time trying to wrap my head around a different form of deployment.

It’s apparent I wasn’t taking into consideration the ‘compile’ piece. Thanks

Now I can can get it to build and release- I’m just receiving a ‘pang’ when I use mix edeliver start production on local shell. So I’ll sleuth to see why I can’t connect.

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

If you’re building the release locally, your server doesn’t need Distillery or even Elixir FYI.

Based on the output of elixir --version it appears that you aren’t actually using 1.7

stephane

stephane

You can also choose the OTP major version when you install elixir via asdf.

asdf install elixir 1.7.x-otp-20

This will install elixir 1.7.x but compiled with OTP 20.

qtheninja

qtheninja OP

Good point, thanks.

I was building it on the server to see if it would run. Which is how it came about but always good to have that confirmation it’s only locally needed.

elixir-user

elixir-user

i dont want to use asdf.
what is the command line instruction to install elixir v.1.8.1?

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
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
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
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
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
ryanwinchester
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted” Version...
New

Other Trending Topics Top

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
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
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
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
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews