24 No man can serve two masters: for either he will hate the one, and love the other; or else he will hold to the one, and despise the other. Ye cannot serve God and mammon.
Mammon in this scripture refers to money. I believe that when God said, "Thou shalt have no other gods before me", He was referring to anything that takes a place of worship in our hearts. On what do we set our hearts? To what do we devote our time? When things become more important than our worship of God, then we cannot fully offer our hearts to Him.