Search code examples
rubywindowsrubyminejetbrains-ide

How to let RubyMine work with cygwin64


I'm currently using cygwin64 on my Windows 10 virtual machine. On there, I've installed rvm, and the default (and only) version of Ruby is ruby 2.4.0p0. Through my IDE (RubyMine) I've linked the ruby interpreter to the ruby interpreter installed on my cygwin64 installation. However, there are some issues i'm having which are quite annoying and I though I would ask here for anyone who might have had this issue before and fixed it some how.

The issues are:

  • Gems not found (requiring files are 'not found': including the standard library, methods not found, classes not found, ...)
  • Using cmd I cannot use commands such as bundler, gem etc (I have to use the cygwin64 terminal)
  • Some features on RubyMine don't work (including the Run button, etc)

I've thought about path variables, but I don't really know which ones I have to set (and where to).

Any help would be appriciated.


Solution

  • I managed to get some things working today and I though I might aswell share it here, for anyone having similar issues in the future. I fixed the first issue through setting up a ssh server on my cygwin64 installation and allow localhost connections to it. I then set up a 'remote interpreter' through RubyMine and linked it to the ruby interpreter through the ssh connection. Gems are found, RubyMine no longer complains about unknown files, code completion works, for me a success!

    I then went searching a bit and found a alternative for the cmd not allowing commands such as bundler, gem, etc. I didn't fix it, but I managed to link the RubyMine's terminal to my cygwin64 terminal. I now can execute these commands through RubyMine, so that isn't that bad.

    Setting up the remote interpreter:
    File -> Settings -> Languages & Frameworks -> Ruby SDK and Gems

    Linking the terminal:
    File -> Settings -> Tools -> Terminal -> Shell path -> C:\cygwin64\Cygwin.bat (in my case)