T
T
Tesla_Rails2015-09-30 00:23:34
Ruby on Rails
Tesla_Rails, 2015-09-30 00:23:34

How to solve ruby ​​version error problem?

When installing for any cloned project, an error appears - "Your Ruby version is 2.1.2, but your Gemfile specified 2.2.2".
The command "rbenv local" gives - "2.2.2". Did "rbenv rehash", reinstalled bundler and rbenv, but didn't help. Most likely, the problem is in the file where the paths are written. But I don't know how to solve it.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
CapeRatel, 2015-09-30
@CapeRatel

I dare to recommend using:
https://rvm.io/
And there will be no problems.

H
Helsus, 2015-10-08
@Helsus


ruby -v - "ruby 2.1.2p95 (2014-05-08) [x86_64-linux-gnu]"
which ruby ​​- "/usr/bin/ruby"
This means that rbenv is not working for you.
Where did you add eval "$(rbenv init - zsh)"it during installation?
PS When which rubyit shows something like /Users/helsus/.rbenv/shims/ruby, then rbenv is working.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question