Why do I get the error “Your Ruby version is 2.0.0, but your Gemfile specified 2.2.2” although I have 2.2.2 installed

后端 未结 3 1788
忘掉有多难
忘掉有多难 2021-02-07 03:08

I\'m using rbenv and I get the error Your Ruby version is 2.0.0, but your Gemfile specified 2.2.2 when I run the bundle install command in my project.

3条回答
  •  爱一瞬间的悲伤
    2021-02-07 03:56

    For me the problem was that I hadn't properly re-initialized rbenv after installing and switching to the new ruby version.

    In my shell config I had an incorrect check to avoid executing source (rbenv init -|psub) if rbenv wasn't installed. After manually sourcing it worked again.

提交回复
热议问题