update ruby version to 2.1.2 & fix a bug.