Cannot add a Ruby SDK

Answered

Hi -

I'm unable to add a Ruby SDK to a project: Project Settings > Project > New SDK > select 'Ruby' > select either the default '/usr/local/bin/ruby' or manually add the path > receive the following error:

Error configuring SDK: null.

Please make sure that /usr/local/bin/ruby is a valid home path for this SDK type.

I have ruby installed; e.g.

# executing the following as a regular user:
% ruby -v
ruby 2.4.4p296 (2018-03-28 revision 63013) [amd64-freebsd11]
% which ruby
/usr/local/bin/ruby
% ruby -e 'puts "Hello, world!"'
Hello, world!

Frustratingly, this works perfectly on my workstation, but fails on my laptop. Both systems are running FreeBSD 11.2, IU-182.4323.46, and Ruby 2.4. I've attached the part of the log from where the error occurs, but I'm happy to share additional information if that would be helpful.

 

Thanks in advance for your time!

Best,

Bridger

Edit: and the part of the log https://pastebin.com/LWmzejtt 

1
9 comments

Hello Bridger,

could you please specify the installed Ruby plugin version.

0

Hi Olga -

On the working machine: Ruby plugin = Version: 2018.2.20180810.

On the not-working machine: Ruby plugin =  Version: 2018.2.20180810.

I tried some other things on the not-working machine:

1) I moved the ~/.IntelliJIdea2018.2 directory and restarted, creating a new ~/.IntelliJIdea2018.2 directory, installing the Ruby plugin (same version: 2018.2.20180810), and following the configuration steps above. That didn't make a difference (I still received the same error).

2) I also tried reinstalling Intellij, treating the configuration directory the same as above, installing the Ruby plugin (same version as above), and repeating the configuration steps above. That didn't make a difference either (still received the same error).

Thanks for your help! Please let me know if there's any other information I can provide.

 

0

Hi Olga -

I wanted to follow up with you on this issue. It is solved, at least in a practical sense: I installed `rvm` and IDEA seems the `rvm` installation in my home directory and associating the excutable there seems to work fine. It's a bit weird that `/usr/local/bin/ruby` fails on this one machine (I have several machines, all configured similarly, with this laptop being the only failure/error thrown when associating that specific path with a Ruby SDK).

So I suppose we can mark this 'closed', or whatever. :)

Thanks again and have a good day!

0

Howdy--

I have this same problem, and was trying to use the snap package manager, but it isn't recognized. Should I assume that I must use rvm or similar?

Thanks,

Derrell

0

Hi Derrell,
As i recall, that was the expedient way of fixing this issue.

I hope that's helpful.
Best

0

Hi Derrell,

could you provide more details about your issue? Do you mean that you cannot add Ruby SDK? 

0

Hi, Olga,

Yes. If I've used `snap` to install Ruby, I cannot identify the relevant binary to allow RM to use it as a Ruby SDK.

On Ubuntu 18.04 LTS, from a cloned project, with no Ruby installed, install Ruby via `snap`: `sudo snap install ruby --classic`.

After this succeeds, `which ruby` will return `/snap/bin/ruby`. If I then attempt to point to this as the Ruby SDK, it isn't accepted (one can't click 'OK' if you type it in, and one can't select it from the dropdown).

0

Thank you for the details. We have a request for supporting snap-based Ruby so please add your vote there: https://youtrack.jetbrains.com/issue/RUBY-23121

0

Excellent! Will do....

0

Please sign in to leave a comment.