I search for some answers related to this question but didn't get a particular answer. I checked my ruby version. Ruby -v gives 2.5.7p206 as a result and in gem file also add ruby '2.5.7p206'.
In gemfile.lock it show
RUBY VERSION ruby 2.5.7p206
So I didn't find where the actual problem.
thank you.