Reputation: 287590
I'm experimenting with the new Windows Subsystem for Linux as a way to develop Rails applications in Windows. I have WSL installed and I have Ruby in it but how do I use that Ruby from a Windows GUI application, specifically, RubyMine:
This is so I can easily start rails, run tests, etc.
Upvotes: 2
Views: 1424
Reputation: 11004
[Update 2020-10-30] Updating the response below as a lot has changed and improved since my initial reply in 2017 😜
The awesome team at JetBrains have enabled RubyMine to talk to WSL via SSH and to use the "remote" Ruby interpreter, and even debug Ruby code running in WSL! :)
Also, in Windows 10 1903, WSL provides the ability to access Linux distros' filesystems from Windows via the \\wsl$\
pseudo-UNC path.
In Windows 10 2004, WSL added a Linux icon to File Explorer making it easier to discover this pseudo-UNC path.
So, in Windows 10 >= 1903, Windows apps, editors, IDEs, etc. can also access files stored in, for example, \\wsl$\Ubuntu\...
!
👉 Notes:
- Accessing files in Linux via
\\wsl$\...
will be slower than accessing files locally because file IO requests have to be marshalled back and forth via a 9P fileserver. If you intend on accessing files intensively, we recommend storing the files in the filesystem closest to whatever you'll be using to access those files most intensively.- Thus ... while you can access files directly via the pseudo-path, using WSL integrations built-in to tools like RubyMine, VSCode, Visual Studio, etc. should be preferred if available.
Upvotes: 2
Reputation: 820
If anyone is wondering how this can be done at this time with the latest version of Ruby, there is a WSL connector for the remote repo of ruby.
Upvotes: 2