Revert "Reverted theme gem"

This reverts commit 2d0d104cadb80813787513fa5822b6a61ee42273.
This might fix weird database adapter issue