How to Install Livebook With Asdf

I’m reading this book Machine learning in Elixir so I tested elixir livebook on my macos using the .dmg installer , and it’s running smoothly. I decided to install it locally on my computer to know what is happening behind the scenes, so it’s straightforward; only need to run these commands: # install or update rebar and hex mix do local.rebar --force, local.hex --force # install as executable livebook mix escript....

October 13, 2023 · 1 min · Carlos Ramos

Add Array of Types in a Column using Postgres and Rails

Recently I found a nice feature when defining a column on migrations, is to use array option in the creation of a column: class MyMigration < ActiveRecord::Migration[5.2] def change # Defines a column that stores an array of a type. add_column :transactions, :categories, :string, array: true, default: [] end end With this on categories you can storage an array of values, it’s useful instead of use jsonb because as json you may also need to create the key to store values (hash)....

October 14, 2019 · 1 min · Carlos Ramos

Install yarn if you are using Nodejs with ASDF

I’m using ASDF to install any language that I needed, so problems become when I have to install yarn a js package manager but to do that has a lot of ways of install yarn and problems increasing with nodejs installed using ASDF more problems become using the brew recipe and it doesn’t work with ASDF. I found a practical solution: is to install a separate yarn recipe into ASDF....

September 24, 2019 · 1 min · Carlos Ramos

Upgrade to Latest Version on ASDF

ASDF is an incredible version manager, to install/upgrade to latest version available of an language you can do the following steps: asdf list-all <language> this show all of the versions available to install, select the latest: asdf install <language> x.y.z and edit if you have a global ~/.tool-versions to use that version everywhere: <languaje> x.y.z real example to upgrade to latest version of erlang (10/17/2019): asdf list-all erlang asdf install erlang 22....

September 17, 2019 · 1 min · Carlos Ramos