Can remote RVM SDK be used from Windows machine?

I just downloaded RubyMine 7.0 on a Windows machine today, and I'm trying to get it to use a remote RVM-based SDK on a Linux machine. I'm a little confused by the documentation; is this supposed to be possible? It partially works, but it seems to be trying to rebuild native gems (e.g., ruby-oci8) even though the gems have already been installed into the gemset on the Linux machine.

5 comments
Comment actions Permalink

Hi,

remote sdk is not supposed to build any gem locally and yes: you can use any remote sdk (rvm included) on Windows.
Here are some docs about remote sdk (https://www.jetbrains.com/ruby/webhelp/configuring-remote-ruby-interpreters.html)
Please let us know what in the doc is unclear so we could improve it.
Also any problem reports are welcome.

Regards, Oleg.

0
Comment actions Permalink

Thanks, Oleg.

I'd seen this note in the documentation you linked to:

7.0+RVM Support: When adding an rvm-based remote interpreter, it is important to specify the gem set:

~/.rvm/gems/<gem set>


It was unclear to me where to specify the gem set, as I had no field called "gem set" or anything similar. I found your comment at https://youtrack.jetbrains.com/issue/RUBY-13312#comment=27-761431, which seemed to indicate that it needed to go in the "Ruby interpreter path" field. Is that correct? If so, it might be good to clarify in the documentation that that's where the gem set directory should be entered. Also, I assume that "~/.rvm/gems/<gem set>" was just an example, right, and the actual directory would depend on your RVM configuration?

At first, I tried entering the gemset directory there, and I had the issue I mentioned trying to rebuild ruby-oci8. But it turns out I had specified /usr/local/rvm/gems/ruby-2.0.0-p353@global when it was actually only in /usr/local/rvm/gems/ruby-2.0.0-p353. That worked for an existing application (albeit with some weird warning messages), but when I tried to create a new instance of the application on my Windows machine, it seemed to only reset part of the execution string. For a bundle install, I got this output:
/usr/local/rvm/rubies/ruby-2.0.0-p353/bin/ruby -e '$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)' C:/Code/sdk_test/bin/bundle install
bash: line 0: cd: C:/Code/sdk_test: No such file or directory
-e:1:in `load': cannot load such file -- C:/Code/sdk_test/bin/bundle (LoadError)
 from -e:1:in `<main>'


Process finished with exit code 1

It looks like it loaded the right ruby, but then tried to run bundle with the Windows machine path instead of the Linux machine path. Not sure if I missed a step somewhere.

---
And if you're curious about the weird warning messages, here they are:
When trying to download gems from the remote (Linux) server:
Could not copy "sftp://[server name]/usr/local/rvm/gems/ruby-2.0.0-p353/gems/axiom-types-0.1.1/.rspec" to "file:///C:/Users/[username]/.RubyMine70/system/ruby_stubs/1578544485/-1537355852/gems/axiom-types-0.1.1/.rspec".

When running bundle install:
Unknown message with code "Could not determine the type of file "sftp://[server name]/usr/local/rvm/rubies/ruby-2.0.0-p353".".

When editing the SDK settings:
Unknown message with code "Could not determine the type of file "sftp://[server name]/[home directory on remote server]/.rubymine_helpers".".

0
Comment actions Permalink

maxfelsher wrote:
 
I'd seen this note in the documentation you linked to:

7.0+RVM Support: When adding an rvm-based remote interpreter, it is important to specify the gem set:

~/.rvm/gems/<gem set>

It was unclear to me where to specify the gem set, as I had no field called "gem set" or anything similar. I found your comment at https://youtrack.jetbrains.com/issue/RUBY-13312#comment=27-761431, which seemed to indicate that it needed to go in the "Ruby interpreter path" field. Is that correct? If so, it might be good to clarify in the documentation that that's where the gem set directory should be entered.


yes, you are right and we will update the doc to be more precice






Also, I assume that "~/.rvm/gems/<gem set>" was just an example, right, and the actual directory would depend on your RVM configuration?

do you mean that rvm could be installed in different location?  If so then yes, more correct example would be <rvm root>/gems/<gem set>


At first, I tried entering the gemset directory there, and I had the issue I mentioned trying to rebuild ruby-oci8. But it turns out I had specified /usr/local/rvm/gems/ruby-2.0.0-p353@global when it was actually only in /usr/local/rvm/gems/ruby-2.0.0-p353. That worked for an existing application (albeit with some weird warning messages), but when I tried to create a new instance of the application on my Windows machine, it seemed to only reset part of the execution string. For a bundle install, I got this output:
/usr/local/rvm/rubies/ruby-2.0.0-p353/bin/ruby -e '$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)' C:/Code/sdk_test/bin/bundle install
bash: line 0: cd: C:/Code/sdk_test: No such file or directory
-e:1:in `load': cannot load such file -- C:/Code/sdk_test/bin/bundle (LoadError)
from -e:1:in `<main>'

Process finished with exit code 1

It looks like it loaded the right ruby, but then tried to run bundle with the Windows machine path instead of the Linux machine path. Not sure if I missed a step somewhere.

for now we do not support creating an app with remote sdk and you have to do it manually :(


---
And if you're curious about the weird warning messages, here they are:
When trying to download gems from the remote (Linux) server:
Could not copy "sftp://[server name]/usr/local/rvm/gems/ruby-2.0.0-p353/gems/axiom-types-0.1.1/.rspec" to "file:///C:/Users/[username]/.RubyMine70/system/ruby_stubs/1578544485/-1537355852/gems/axiom-types-0.1.1/.rspec".

When running bundle install:
Unknown message with code "Could not determine the type of file "sftp://[server name]/usr/local/rvm/rubies/ruby-2.0.0-p353".".

When editing the SDK settings:
Unknown message with code "Could not determine the type of file "sftp://[server name]/[home directory on remote server]/.rubymine_helpers".".


this looks like a bug for me, please report it in our teracker (https://youtrack.jetbrains.com/issues/RUBY) with RubyMine's logs attached (Help|Show log in ...)

Regards, Oleg.

0
Comment actions Permalink

oleg.sukhodolsky wrote:

maxfelsher wrote:

 
I'd seen this note in the documentation you linked to:

7.0+RVM Support: When adding an rvm-based remote interpreter, it is important to specify the gem set:

~/.rvm/gems/<gem set>

It was unclear to me where to specify the gem set, as I had no field called "gem set" or anything similar. I found your comment at https://youtrack.jetbrains.com/issue/RUBY-13312#comment=27-761431, which seemed to indicate that it needed to go in the "Ruby interpreter path" field. Is that correct? If so, it might be good to clarify in the documentation that that's where the gem set directory should be entered.


yes, you are right and we will update the doc to be more precice

Great, thanks!

Also, I assume that "~/.rvm/gems/<gem set>" was just an example, right, and the actual directory would depend on your RVM configuration?

do you mean that rvm could be installed in different location?  If so then yes, more correct example would be <rvm root>/gems/<gem set>

Yes, that's what I meant. For example, this server has rvm installed system-wide in /usr/local/rvm.

At first, I tried entering the gemset directory there, and I had the issue I mentioned trying to rebuild ruby-oci8. But it turns out I had specified /usr/local/rvm/gems/ruby-2.0.0-p353@global when it was actually only in /usr/local/rvm/gems/ruby-2.0.0-p353. That worked for an existing application (albeit with some weird warning messages), but when I tried to create a new instance of the application on my Windows machine, it seemed to only reset part of the execution string. For a bundle install, I got this output:

/usr/local/rvm/rubies/ruby-2.0.0-p353/bin/ruby -e '$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)' C:/Code/sdk_test/bin/bundle install

bash: line 0: cd: C:/Code/sdk_test: No such file or directory

-e:1:in `load': cannot load such file -- C:/Code/sdk_test/bin/bundle (LoadError)

from -e:1:in `<main>'

Process finished with exit code 1

It looks like it loaded the right ruby, but then tried to run bundle with the Windows machine path instead of the Linux machine path. Not sure if I missed a step somewhere.

for now we do not support creating an app with remote sdk and you have to do it manually :(

I might not have been clear, this was just a new git clone of the same project. I realized what I'd left out--I needed to enter the deployment path in the "Mappings" tab of the Deployment settings.

---

And if you're curious about the weird warning messages, here they are:

When trying to download gems from the remote (Linux) server:

Could not copy "sftp://[server name]/usr/local/rvm/gems/ruby-2.0.0-p353/gems/axiom-types-0.1.1/.rspec" to "file:///C:/Users/[username]/.RubyMine70/system/ruby_stubs/1578544485/-1537355852/gems/axiom-types-0.1.1/.rspec".

When running bundle install:

Unknown message with code "Could not determine the type of file "sftp://[server name]/usr/local/rvm/rubies/ruby-2.0.0-p353".".

When editing the SDK settings:

Unknown message with code "Could not determine the type of file "sftp://[server name]/[home directory on remote server]/.rubymine_helpers".".

this looks like a bug for me, please report it in our teracker (https://youtrack.jetbrains.com/issues/RUBY) with RubyMine's logs attached (Help|Show log in ...)

Regards, Oleg.


Sure, I'll report these in the bug tracker.


One usability issue that I can report elsewhere if that's helpful: even though I have the "Ignore info messages" box checked in the Advanced Options for the deployment server, I still get popup boxes with the server's boilerplate login info message when running processes on the server. Not every time I run something though--I'm not sure if the message is getting blocked those times, or if RubyMine keeps the connection open for a little while and so only hits that login message when it has to reconnect. Thoughts?

0
Comment actions Permalink

Hi,

At first, I tried entering the gemset directory there, and I had the issue I mentioned trying to rebuild ruby-oci8. But it turns out I had specified /usr/local/rvm/gems/ruby-2.0.0-p353@global when it was actually only in /usr/local/rvm/gems/ruby-2.0.0-p353. That worked for an existing application (albeit with some weird warning messages), but when I tried to create a new instance of the application on my Windows machine, it seemed to only reset part of the execution string. For a bundle install, I got this output:

/usr/local/rvm/rubies/ruby-2.0.0-p353/bin/ruby -e '$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)' C:/Code/sdk_test/bin/bundle install

bash: line 0: cd: C:/Code/sdk_test: No such file or directory

-e:1:in `load': cannot load such file -- C:/Code/sdk_test/bin/bundle (LoadError)

from -e:1:in `<main>'

Process finished with exit code 1

It looks like it loaded the right ruby, but then tried to run bundle with the Windows machine path instead of the Linux machine path. Not sure if I missed a step somewhere.

for now we do not support creating an app with remote sdk and you have to do it manually :(

I might not have been clear, this was just a new git clone of the same project. I realized what I'd left out--I needed to enter the deployment path in the "Mappings" tab of the Deployment settings.

yes, you do need to specfy mappings


---
And if you're curious about the weird warning messages, here they are:
When trying to download gems from the remote (Linux) server:
Could not copy "sftp://[server name]/usr/local/rvm/gems/ruby-2.0.0-p353/gems/axiom-types-0.1.1/.rspec" to "file:///C:/Users/[username]/.RubyMine70/system/ruby_stubs/1578544485/-1537355852/gems/axiom-types-0.1.1/.rspec".

When running bundle install:
Unknown message with code "Could not determine the type of file "sftp://[server name]/usr/local/rvm/rubies/ruby-2.0.0-p353".".

When editing the SDK settings:
Unknown message with code "Could not determine the type of file "sftp://[server name]/[home directory on remote server]/.rubymine_helpers".".


this looks like a bug for me, please report it in our teracker (https://youtrack.jetbrains.com/issues/RUBY) with RubyMine's logs attached (Help|Show log in ...)

Regards, Oleg.


Sure, I'll report these in the bug tracker.

Thanks,

One usability issue that I can report elsewhere if that's helpful: even though I have the "Ignore info messages" box checked in the Advanced Options for the deployment server, I still get popup boxes with the server's boilerplate login info message when running processes on the server. Not every time I run something though--I'm not sure if the message is getting blocked those times, or if RubyMine keeps the connection open for a little while and so only hits that login message when it has to reconnect. Thoughts?

I have no idea what may cause such problems (I am not even sure I've understood the problem's description correctly)
I'd suggest to file a ticket with a small screencast attached.

Regards, Oleg.

0

Please sign in to leave a comment.