I got a Rails project that uses Ruby 2.5.3 and I can run bin/rake --tasks
from the terminal just fine:
$ rbenv version
# 2.5.3 (set by /Users/me/myproject/.ruby-version)
However, I get a message each time RubyMine telling me that rake --tasks
can't be executed.
This is more of a nuisance than a real problem but I still want to get this fixed.
Interestingly, a different rubyframework 2.6.0
is used and it is the "native" ruby rather than one of my rbenv
installations:
Error:[rake --tasks] /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.0.2) required by your /Users/besi/Dropbox/projects/boexli/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:2.0.2`
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
from /usr/bin/bundle:23:in `<main>'
Error:[rake --prereqs] /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.0.2) required by your /Users/besi/Dropbox/projects/boexli/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:2.0.2`
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
from /usr/bin/bundle:23:in `<main>'
I think, if I could change that framework 2.6
to my default 2.5.3
the issue would be resolved, but I can't seem to find that setting.
The SDK from which that task is executed does not show up the SDK Dialog at all.
question from:
https://stackoverflow.com/questions/65951682/rubymine-2019-1-cant-run-rake-tasks 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…