How to create custom Error with passing data

Category: Ruby :: Published at: 21.04.2022

Sometimes raising error is not enough. As probably you know, you can use command like this:

raise ActiveModel::StrictValidationFailed, "Some message"

This command will return 500 error on your website + it will log into your console the name of the error and message you passed in.

But it won't give you any context. This is big problem if for example you call API and your response is bad.
You want to know, what is happening there directly.

Fortunately there is some solution for it.

Read more

gitlab, github - Permission denied (publickey,keyboard-interactive)

Category: Ruby :: Published at: 06.04.2022

Today i've suffered some issue with a SSH key. I've tried to clone my repository from

Unfortunately i've received an error:

Permission denied (publickey,keyboard-interactive)

I've thought, i have problem with a SSH key. Unfortunately, adding a SSH key did not resolve the problem.

How to resolve it?

Read more

How to work with Searchkick gem - Elasticsearch

Category: Ruby :: Published at: 12.01.2022

Elasticsearch is just an amazing search engine with a lot of flexibility.

You can think, that working with this tool is very hard, but actually, it is not.

Today I will show you, how to use Elasticsearch through the Searchkick gem.

Read more

Conditional Statements in SQL - CASE, COALESCE, CAST

Category: SQL :: Published at: 31.12.2021

In this article you will get the knowledge about different conditional statements which are appearing in SQL language.

You will know how to execute SQL query only when some conditions are met.

Read more

How to use Self-Join in SQL

Category: SQL :: Published at: 31.12.2021

SQL beginners can have some problems with understanding how Self-Join works. But everybody should understand
how handy this query type is. It helps us to combine two records inside same table into single row.

This thing is widely used on some level of programming and for sure we all sure understand, how to use it.

Read more

How to use SubQuery in SQL

Category: SQL :: Published at: 31.12.2021

Sometimes you can realize, one query is not enough to get the information you want.
It just feels like you need to do it "in steps". Thank god, we have Subqueries in SQL.

Subqueries will help you make more complex SQL queries and i will show you how to write them.

Read more