Most of the Ruby gems that you develop need to interact with the operating system or invoke external commands.
To do this, Ruby provides many built-in methods: exec, system, spawn, ```, %x[], etc.
There are also many different libraries that encapsulate all the complexity of working with parameter escaping, input/output, passing environment variables, getting exit codes, etc.
One of my favorite gems is qbash.
It is a simple and powerful wrapper over open3, which extends the Kernel module with only one qbash method.
The source code and usage examples can be found here.
What gems do you use for these purposes?
$ gem install qbash
$ irb
4.0.1 :001 > require 'qbash'
=> true
4.0.1 :002 > puts qbash(%w[ps -aux | grep $PATTERN], env: { 'PATTERN' => 'ruby' })
artem 17085 0.0 0.0 6536 2672 pts/1 S+ 15:45 0:00 grep ruby