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 1791
忘掉有多难
忘掉有多难 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 04:03

    I finally solved my problem using this thread Bundler not working with rbenv, could not find [gem],

    by using these commands after reinstalling rbenv:

    • gem install --no-ri --no-rdoc bundler
    • rbenv rehash
    • bundle --path=vendor/bundle

提交回复
热议问题