Fixed using different Ruby versions for building on Travis. Thanks henrikhodne.