教程
https://juejin.cn/post/6904204635309883405#heading-0
遇到的问题
RubyMine使用ruby2.7.2版本时,编译调试报错如下
Traceback (most recent call last):
4: from /Users/lanht/.rvm/rubies/ruby-2.7.2/bin/ruby_executable_hooks:22:in `<main>'
3: from /Users/lanht/.rvm/rubies/ruby-2.7.2/bin/ruby_executable_hooks:22:in `eval'
2: from /Users/lanht/.rvm/rubies/ruby-2.7.2/bin/bundle:23:in `<main>'
1: from /Users/lanht/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/rubygems.rb:296:in `activate_bin_path'
/Users/lanht/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/rubygems.rb:277:in `find_spec_for_exe': Could not find 'bundler' (1.17.3) required by your /Users/lanht/Desktop/rubyDebug/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:1.17.3`
处理方案
查看系统发现系统使用的是ruby2.6.3,切换系统ruby版本为2.7.2
image.png
卸载目录下的Gemfile.lock,重新执行bundle install