The Ruby on Rails website recommends installing Ruby from source under Linux.
I encountered a number of C library problems building ruby from source on a clean install of Ub
I don't see what your problem is. You say that require 'zlib' returns false. But that means that it did work! If there were an error, you would get a LoadError exception.