I tried to uninstall datamapper using the command gem uninstall dm-core.
But it seems that a whole bunch of dependent gems also need to be uninstalled.
If you would like to use some wild cards to remove some gems (e.g. to remove some gems from a specific vendor) then you can pipe the output from gem list to grep as shown below
gem list --no-version | grep "opener-" | cut -d " " -f1 | xargs gem uninstall -aIx
The above command removes all the gems whose name begins with "opener-"