3 de julho de 2018

Running Bundle without install Postgresql

When you use the gem PG in your Ruby or Rails project, usually is necessary install Postgresql before install the gems. But, if your DB is running in a docker, you does not need the Postgresql running local.

So, you need install a lib called 'libpq' on Mac OS before install PG gem. After this you can remove them. Command: brew install libpq

If you are using Debian, execute sudo apt-get install libpq-dev

*** If you don't use brew:

1. Install gem PG by the litle native app Postgres.app. To install access 
https://postgresapp.com/. After installation, execute the and can close them.

$ gem install pg -v <gem version `0.20.0`> -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.4/bin/pg_config

Done!

PS.: To use PSQL, creates a symbolic link like bellow:


$ ln -s /Applications/Postgres.app/Contents/Versions/latest/bin/psql /usr/local/bin/psql

PGPASSWORD=<your-password> psql -h localhost -p 5432 -U postgres -c "\list"

Done again!

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 ...