asdf-ruby: IntelliJ won't detect Ruby interpreter installed using asdf-vm whatsoever
IDE and OS version
IDE - IntelliJ IDEA 2022.1.1 (Ultimate Edition): Build #IU-221.5591.52, built on May 11, 2022 OS - Pop!_OS 22.04 LTS
What steps will reproduce the issue?
Install the latest version of Ruby using asdf-vm Create a new Ruby project in IntelliJ
What is the expected result? Intellij should detect the Ruby interpreter installed using asdf-vm
What happens instead?
IntelliJ detects Ruby interpreter from the location /usr/bin/ruby instead. No Ruby interpreter was installed at this location. Upon manually navigating to that directory, no Ruby interpreter is found. Also unable to delete this file using IntelliJ.
When trying to manually change the interpreter to asdf-vm location (/home/jaymin/.asdf/shims/ruby), it throws the following error:
Error configuring SDK: Unable to read RbConfig for ruby (/home/jaymin/.asdf/shims/ruby). Please make sure that /home/jaymin/.asdf/shims/ruby is a valid home path for this SDK type.
Log file The log file is attached herewith idea.log
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (1 by maintainers)
For future reference, I experienced the same issue today with asdf 0.15.0:
asdf reshimdid not help with this issue for some reason.For future readers,
asdf reshimfixed it inv0.13.1-0586b37If you’re having problems with RubyMine since updating asdf to v0.16+: https://youtrack.jetbrains.com/issue/RUBY-33864/Support-asdf-0.16
I followed How to: Debug detecting of Ruby interpreters and added
#org.jetbrains.plugins.ruby.version.management.asdf.AsdfSdkRefresherin Custom Debug Log Configuration dialog.Checking logs revealed this error:
Which is correct. The correct path, at least in asdf 0.11.0 is
Creating the link and restarting IDE fixed the issue for me
Update: I installed RubyMine and Intellij using JetBrains Toolbox and it seems to fix the issue. Earlier, both these IDEs were installed using Pop!_Shop. Ruby versions are being detected automatically.
I tried using the directory mentioned in the question as well as
/home/jaymin/.asdf/installs/ruby/3.1.2/bin/rubydirectory, but I get the same error. Is there any other directory I should be trying?Issue on YouTrack - https://youtrack.jetbrains.com/issue/RUBY-29810/IntelliJ-wont-detect-Ruby-interpreter-installed-using-asdf-vm-whatsoever