Ruby SDK not taking effect

Hey all,

I'm not managing to get an SDK working for a project I need to do a bit of debugging on (https://github.com/fluent/fluentd if you're interested).

I'm trying to run a test, but it errors with `Error running test_out_exec_filter: No SDK specified`.

I've followed the instructions online and have the following set up:

 

I _think_ that should now be setting the SDK. But running my test generates the same error.

Furthermore I also get this banner:

I've tried following that through and setting it again. Including choosing the /usr/bin/ruby rather than the rbenv one. No luck. 

I'm using RubyMine 2016.2
Build #RM-162.1812.23, built on September 5, 2016
JRE: 1.8.0_112-release-b343 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

OSX El Capitan 10.11.6

 

Any ideas much appreciated. 

Thanks

3

Hello,

sorry for the delay. Could you please try removing SDK in question, invalidating caches (File | Invalidate Caches) and re-adding SDK. How does it go?

0

I have similar behaviour with IntelliJ Idea, details:

IntelliJ IDEA 2016.3.4
Build #IU-163.12024.16, built on January 31, 2017
Licensed to Vanja Radovanović
Subscription is active until April 14, 2017
JRE: 1.8.0_112-release-408-b6 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

I tried removing all Ruby SDKs and invalidating the cache, as suggested.
When Idea restarts, it picks up a Ruby SDK from rbenv automatically:

After that, I import a Ruby project as new module but reject Rails facet (although this step doesn't matter really, behaves the same).
Then I try to set the module's SDK:

Then I try to apply the changes, but nothing happens.
The modal isn't closed, no error message whatsoever, just stays there and can't close it other than hitting Cancel in which case all the changes are lost.
If I don't set the SDK for the Ruby module, it says "No Ruby interpreter found for ..." and I can't make changes to other modules.
So, I'm kind of stuck :)

Help appreciated!

0

@Elvanja,

how does it go in case you click on OK after Apply? Could you please attach the whole screenshot of the Project Structure window.

0

Hitting Apply doesn't change the Apply button, it remains active.
Hitting OK after that also does nothing, this is how the window looks:

1

 

Just to let other people know, we have an issue for the use case described by Elvanja:

https://youtrack.jetbrains.com/issue/RUBY-19109

0

I am having the same issue. Choosing the SDK has no effect. I keep seeing the banner 'No ruby interpreter'.

I am using RVM and ruby version is 2.2.1 for the project.

There are also other ruby versions present on my system.

 

Once I choose the SDK and click apply, it hangs up for some minutes. Then on clicking OK, it still keep complaining about ruby sdk not found.

 

0

I found that deleting the project .iml file and then reimporting it fixed the problem. None of the settings in the IDE had any effect.

1

Doing what James Eaton said was the only thing that helped - even after all these years. Thank you :D 

0

I'm also having this issue with IntelliJ 2023.3.2 - choosing the Ruby SDK and clicking “OK” or “Apply” does nothing. I'm using rbenv to manage my Ruby versions.

Deleting the .idea files and reimporting a project isn't a great solution for me, since I've accumulated a fair bit of configuration there and it'd be frustrating to lose it.

In the end, this hack seems to have worked:

  1. Close IntelliJ
  2. Use another editor to open the project's .iml file
  3. Manually modify the `<orderEntry type="jdk" jdkName="rbenv: 3.2.2" jdkType="RUBY_SDK" />` entry to match the name of the Ruby SDK you're targeting
  4. Open IntelliJ and wait for it to reindex your gems, etc
0

请先登录再写评论。