We present abundance measurements of elements O , C , Si and Fe for three gas-rich galaxies at z \sim 5 using observations from the Very Large Telescope ( VLT ) and the Keck telescope in order to better constrain the early chemical enrichment of gas-rich galaxies . These galaxies show strong Lyman- \alpha absorption in the spectra of background quasars , with neutral hydrogen column densities log N _ { H I } ( cm ^ { -2 } ) = 20.10 \pm 0.15 , 20.10 \pm 0.15 , and 20.80 \pm 0.15 . Using the undepleted element O , we find the metallicities [ O/H ] to be in the range of -2.51 to -2.05 dex . Our study has doubled the existing sample of measurements of undepleted elements at z > 4.5 . Combining our measurements with those from the literature , we find that the N _ { H I } -weighted mean metallicity of z \sim 5 absorbers is consistent with the prediction based on z < 4.5 DLAs . Thus , we find no significant evidence of a sudden drop in metallicity at z > 4.7 as reported by some prior studies . We also determine the extent of dust depletion using a combination of both the volatile element O and the refractory elements Si and/or Fe . Some of the absorbers show evidence of depletion of elements on dust grains , e.g . low [ Si/O ] or [ Fe/O ] . The relative abundances of these absorbers along with other z \sim 5 absorbers from the literature show some peculiarities , e.g . low [ C/O ] in several absorbers and high [ Si/O ] in one absorber . Finally , we find that the metallicity vs. velocity dispersion relation of z \sim 5 absorbers may be different from that of lower-redshift absorbers .