17 de maio de 2018

Manage your framework versions in a simple way

To install ASDF, follow the manuals and steps bellow...

$ git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.4.3

# Add the two lines bellow on your terminal load file (e. .bashrc, .zshrc)
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash

# Adding plugins for ruby and nodejs
$ asdf plugin-add ruby https://github.com/asdf-vm/asdf-ruby.git
$ asdf plugin-add nodejs https://github.com/asdf-vm/asdf-nodejs.git

* I do not recommend you migrate ruby version from RVM, because is fast to install ruby versions.

# To install the tools ruby and nodejs, follow bellow steps

# Ruby

$ asdf install ruby 2.2.9

# Set ruby version locally - asdf <global | local> ruby <version>
$ asdf local ruby 2.2.9

$ ruby --version # ruby 2.2.9p480 (2017-12-15 revision 61259) [x86_64-darwin17]

# Nodejs

# (slow)Imports NodeJS release team's OpenPGP keys to main keyring
$ brew install gpg

** For debian, executes:

    $ sudo apt-get install gpg dirmngr

$ bash ~/.asdf/plugins/nodejs/bin/import-release-team-keyring
$ asdf install nodejs 8.10.0

** When install or update a new version and receive the error: No public key. Executes:

$ bash ~/.asdf/plugins/nodejs/bin/import-release-team-keyring

If does not work, try:

gpg --keyserver pool.sks-keyservers.net --recv-keys <key-that-has-error>


# Common commands

# Set a local tool version
$ asdf local <name> <version>

# List details of tools
$ asdf current

# Set a tool version
$ asdf local <name> <version>

# List the versions of a tool
$ asdf list <name>

# Detail of environment

When you set a version GLOBAL, this is set in ~/.tool-versions
Otherwise, if you set LOCAL, a file called .tool-versions will be saved in that folder.
I prefer always to use LOCAL.

Running puma 3.6 in Linux's that SSL is updated

When you use the gem Puma 3.6 in your Ruby or Rails project, on Linux that SSL is more updated. You needs to install the previewsly version ...