Ruby_dep requires Ruby version >= 2.2.5, ~> 2.2. error on gitlab

I got following error on pipeline when I pushed my local repo to gitlab.

 Running with gitlab-runner 10.4.0 (857480b6)
  on docker-auto-scale (4e4528ca)
Using Docker executor with image ruby:2.1 ...
Using docker image sha256:8986d3ac164db138dbf19538f81c993c34a560999e78f1f143092640665ddde2 for predefined container...
Pulling docker image ruby:2.1 ...
Using docker image ruby:2.1 ID=sha256:223d1eaa9523fa64e78f5a92b701c9c11cbc507f0ff62246dbbacdae395ffea3 for build container...
Running on runner-4e4528ca-project-5366807-concurrent-0 via runner-4e4528ca-srm-1517812251-c1725738...
Cloning repository...
Cloning into '/builds/bpmottathai/apps'...
Checking out 2008459e as master...
Skipping Git submodules setup
$ gem install jekyll
Successfully installed public_suffix-3.0.1
Successfully installed addressable-2.5.2
Successfully installed colorator-1.1.0
Building native extensions.  This could take a while...
Successfully installed http_parser.rb-0.6.0
Building native extensions.  This could take a while...
Successfully installed eventmachine-1.2.5
Successfully installed em-websocket-0.5.1
Successfully installed concurrent-ruby-1.0.5
Successfully installed i18n-0.9.3
Successfully installed rb-fsevent-0.10.2
Building native extensions.  This could take a while...
ERROR:  Error installing jekyll:
	ruby_dep requires Ruby version >= 2.2.5, ~> 2.2.
Successfully installed ffi-1.9.18
Successfully installed rb-inotify-0.9.10
Successfully installed sass-listen-4.0.0
Successfully installed sass-3.5.5
Successfully installed jekyll-sass-converter-1.5.2
ERROR: Job failed: exit code 1