In this post, we will see how to resolve How to change DRY a spec to avoid deprecation warning “The implicit block expectation syntax is deprecated, you should pass a block…” Question: I have to following rspec fragment: I get ...

In this post, we will see how to resolve Ruby on Rails – need an idea Question: I need an advice or maybe better to call it idea. 🙂 Imagine you have an class, lets call it Tree. Trees are ...

In this post, we will see how to resolve Return nil instead of undefined method `[]’ for nil:NilClass when having array of objects Question: I have the following @params where people is an array of objects. {"people"=>[{"email"=>"[email protected]"}, {"email"=>"[email protected]"}]} I am ...

In this post, we will see how to resolve wkhtmltopdf shrinks the input, which was fine in the older version Question: We use wkhtmltopdf to generate PDF from html and when upgraded from 0.12.3 to 0.12.6, we noticed that the ...

In this post, we will see how to resolve Ruby require – cannot load such file — google/api_client Question: I’m trying to write a ruby script to upload youtube videos, but I can’t get past this line: I get this ...

In this post, we will see how to resolve SQL – how to query for rows based on param and joined tables Question: I have the following GET endpoint in a Ruby project: /endpoint/:special_param I have a db with 2 ...

In this post, we will see how to resolve Input in Ruby being the only one ran in loop Question: I’ve been trying to program a tic-tac-toe matchbox-based learning AI in Ruby, so I created the basic game first. But ...

In this post, we will see how to resolve Ruby on Rails: How do I remove the yarn I created? Question: I created the yarn using this: and it produced a package.json and node modules package.json yarn.lock Gem file: Best ...

In this post, we will see how to resolve Every time I test, the number of test users is increasing…? Question: I’m a newbie so sorry if this is a basic question. I’m using M1 Mac. I am creating an ...

In this post, we will see how to resolve How can I extend a class from a gem with a method? Question: Trying to extend the (terrific) (mail gem), and having trouble with that. Mail can be used like so: ...