Vagrant: "Configure Remote Ruby Interpreter" fails with "Can't create Ruby SDK - Communication Error" Follow
I am unable to add a remote Ruby SDK for my development Vagrant box.
RubyMine apparently finds and parses my Vagrantfile just fine. I can browse the remote directory structure and locate the ruby command (in /usr/local/rbenv/shims) by using the dialog that pops up when I click the folder icon.
But when I click 'ok' in the final dialog I get an error dialog with the message "Can't create Ruby SDK - Communication Error".
I have previously been able to add a remote interpreter on the same Vagrant box but now it won't work.
Build #RM-191.6183.108, built on April 2, 2019
JRE: 1.8.0_202-release-1483-b39 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Please sign in to leave a comment.
would it be possible to check how it goes in RubyMine 2019.2 Beta2? If the problem persists there could you please share your Vagrantfile so that I can check your setup as well?
I will give it a shot on 2019.2 Beta2 and get back to you.
I tried adding the remote SDK again, this time on RubyMine 2019.2 Beta2.
RubyMine 2019.2 EAP
Build #RM-192.5728.47, built on July 16, 2019
RubyMine EAP User
Expiration date: August 15, 2019
Runtime version: 11.0.3+12-b304.10 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
GC: ParNew, ConcurrentMarkSweep
Registry: ide.editor.tabs.open.at.the.end=true, debugger.watches.in.variables=false, ide.balloon.shadow.size=0
Non-Bundled Plugins: com.alayouni.ansiHighlight, com.vladsch.idea.multimarkdown
I still get an error, but the message/behavior has changed:
* when I try to browse through the directory structure I get "permission denied" at /usr/local. I have verified that the directory is accessible by the vagrant user.
* if I manually enter the path to the ruby command (/usr/local/rbenv/shims/ruby), then I get the error "Could not get RubyGems environment for Remote" (see screenshot), and the path mentioned looks strange (path of the Vagrantfile + absolute path within the VM)
My Vagrantfile (project name redacted):
Thanks, and kind regards
Have you installed rbenv manually there? Which mode did you use (which way of installing)?
I think it was installed manually there sometime in the past by the person who originally created this VM (I "inherited" the VM)
I've installed rbenv there and ruby 2.5.5, after that I managed to add a Vagrant SDK by specifying the path to the rbenv executable
I think I found the cause of the "permission error": There was a broken symlink inside /usr/local (bundle -> /root/vendor/bundle_export). This seems like a bug in the logic that parses the directory listing (in Rubymine). I believe a broken link should not make the whole directory become listed as "Permission Denied".
However, my main issue remains. I tried pointing RM to /usr/local/rbenv/bin/rbenv instead, but that gives me the error "No Rubies installed".
Any way to get more specific error messages?
Could you please provide the output for `which rbenv`, `rbenv versions` and also share your idea.log (Help - Show log in)?
Some time has passed where I was a bit too busy to deal with this issue, but I'm back and would really like to get this to work. I have removed my RM folder (~/.Rubymine2019.2) and any .idea folders, and created a new project.I can now add the remote interpreter without seeing any errors, but the gems in the VM does not show up in the list, even if I click the synchronize button.
> Could you please provide the output for `which rbenv`, `rbenv versions` and also share your idea.log (Help - Show log in)?
I am not currently using rbenv. Ruby is installed as follows:
OS: Centos 7 (in a Vagrant box)
Below is the log from opening Rubymine, going to settings, selecting the remote interpreter and clicking the synchronize button:
Okay, good news: I notice an error message appearing:
I tried moving the known_hosts file and now the gems are synced!
I am still curious as to what caused my original problems. Perhaps having multiple Vagrantfiles (I was moving code between two applications)..?
Anyway my problem seems solved for now. I will open a new issue if needed. Thanks for your help so far.