教程
https://juejin.cn/post/6904204635309883405#heading-0
遇到的問題
RubyMine使用ruby2.7.2版本時(shí)蚂斤,編譯調(diào)試報(bào)錯(cuò)如下
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`
處理方案
查看系統(tǒng)發(fā)現(xiàn)系統(tǒng)使用的是ruby2.6.3臂港,切換系統(tǒng)ruby版本為2.7.2
image.png
卸載目錄下的Gemfile.lock,重新執(zhí)行bundle install