1

I'm trying to get a legacy project working on my local machine.

My expectation is that the project will have Ruby 2.3.1 when I bundle install however instead what's being used is the Mac OS X system Ruby 2.6.3.

$ rbenv global
2.3.1

$ rbenv local
2.3.1

$ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin19]

$ gem install bundler -v 1.17.3
Fetching: bundler-1.17.3.gem (100%)
Successfully installed bundler-1.17.3
Parsing documentation for bundler-1.17.3
Installing ri documentation for bundler-1.17.3
Done installing documentation for bundler after 4 seconds
1 gem installed

$ bundle install
Fetching gem metadata from https://rubygems.org/.......
google-protobuf-3.2.0.2-universal-darwin requires ruby version >= 2.0, < 2.5, which is incompatible with the current version, ruby 2.6.3p62

$ bundle env | grep Ruby
Ruby          2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
  Full Path   /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
  Config Dir  /Library/Ruby/Site
RubyGems      3.0.3
  Gem Path    /Users/charney/.gem/ruby/2.6.0:/Library/Ruby/Gems/2.6.0:/Users/charney/.gem:/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0

$ curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-doctor | bash
Checking for `rbenv' in PATH: /usr/local/bin/rbenv
Checking for rbenv shims in PATH: OK
Checking `rbenv install' support: /usr/local/bin/rbenv-install (ruby-build 20210804)
Counting installed Ruby versions: 1 versions
Checking RubyGems settings: OK
Auditing installed plugins: OK


Charney Kaye
  • 3,667
  • 6
  • 41
  • 54
  • have you run the rbenv-doctor script? `curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-doctor | bash` – Gabriel Cabrera Aug 19 '21 at 19:43
  • I have run the `rbenv-doctor` script and added the output to my question. Also, I've confirmed that I'm still experiencing the same error on `bundle install` afterward. – Charney Kaye Aug 20 '21 at 00:04
  • I was using **tmux** as my shell, so I tried **zsh** and that did not change anything. Considering other items in this toolchain I might reinstall... – Charney Kaye Aug 20 '21 at 18:00

0 Answers0