If you see errors like the following while installing Ruby and Rails
custom_require.rb:21:in `require__': No such file to load -- zlib (LoadError)
See the following links as I found them helpful.