IOS:Fix Your Ruby version is 2.6.8, but your gemfile specified 2.5.5
On my local machine I'm using rbenv
When I run bundle install I get:
The git source git://github.com/sinatra/sinatra.git uses the git protocol, which transmits data without encryption. Disable this warning with bundle config git.allow_insecure true, or switch to the https protocol to keep your data secure.
Warning: the running version of Bundler (1.17.2) is older than the version that created the lockfile (1.17.3). We suggest you upgrade to the latest version of Bundler by running gem install bundler.
Following files may not be writable, so sudo is needed:
/Library/Ruby/Gems/2.6.0
/Library/Ruby/Gems/2.6.0/build_info
/Library/Ruby/Gems/2.6.0/cache
/Library/Ruby/Gems/2.6.0/doc
/Library/Ruby/Gems/2.6.0/extensions
/Library/Ruby/Gems/2.6.0/gems
/Library/Ruby/Gems/2.6.0/specifications
Your Ruby version is 2.6.8, but your Gemfile specified 2.5.5
The problem is, when I run rbenv versions, I get the right version (2.5.5):
system
- 2.5.5 (set by /Users/Mahmoud/dev-reps/non-docker/normal/.ruby-version)
And when I run which ruby, it correctly points to rbenv:
/Users/Mahmoud/.rbenv/shims/ruby
Even ruby -v gives the correct version:
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-darwin21]
So persumably, 2.5.5 is the ONLY version I have. In addition to this I tried all the usual hacks related to bundler:
bundle uninstall, gem uninstall bundler -v 1.17.2 but nothing seems to work.
Another "interesting" fact that I think gives a hint: which bundle gives:
/usr/local/bin/bundle
My question is where is this 2.6.8 coming from? And how can I fix this and start the server?

浙公网安备 33010602011771号