Once downloaded and ready, you can follow the instructions in the getting started doc to install the ibm_db gem.
When setting the IBM_DB_HOME and LD_LIBRARY_PATH make sure you have the lib and include directories under the specified location.
The error you are seeing is because installation process is not able to find the DB2 libraries. This will be corrected by downloading the Mac client and setting the environment variables correctly.