Path variables in RubyMine?

I got a project where I need to set the local root of Debug condig to be different per machine. I thought I'd found some way to set this up, but it's been a while since I did it so now when I'm on a new machine I don't recall any more.

I have my project set up such that instead of a hard coded path in REMOTE_ROOT and LOCAL_ROOT it users a variable, something like $PATH_NAME_WHATEVER$ where this could be configured per machine. But I cannot figure out where that was now. Closest I get is Path Variables described in IntelliJ docs: https://www.jetbrains.com/help/idea/2016.2/path-variables-2.html

But I find nothing that looks like Path Variables in RubyMine 2016.2.3's Settings.

Anyone got any ideas?

9 comments
Comment actions Permalink

Or - even if there's a way to insert variables for system folders like the user folder - that'd be sufficient. My issue is that I need a path that's under the user account which will have a different username from machine to machine.

0
Comment actions Permalink

Hello, Thomas,

could you please check if setting environment variables is what you need:

https://www.jetbrains.com/help/ruby/2016.2/run-debug-configuration-ruby.html

As for global path variables like in IDEA please vote for the corresponding feature request:

https://youtrack.jetbrains.com/issue/RUBY-13419

0
Comment actions Permalink

What I'm looking to do is set some kind of variable in Remote root folder and Local root folder. In this specific example I want to use a variable to represent my user folder "C:\Users\Thomas\". (Or even the AppData folder in general)

And I'm using Ruby remote debug.

0
Comment actions Permalink

Hi, Thomas,

in this case you can configure remote Ruby SDK and use Ruby (or other) Run configurations, where environment variables might be specified.

0
Comment actions Permalink

Hi Olga

"remote Ruby SDK"? What and where is that in the UI?

My should perhaps note that I'm trying to connect to SketchUp, which embeds an Ruby interpreter - which is why I have been using the Ruby Remote Debug.

0
Comment actions Permalink

I just got prompted by RubyMine to configure missing path variables - this is what I was looking for earlier. I got to that dialog now by clicking on the notification that appeared - but where do I find this in the UI?

0
Comment actions Permalink

Hello, Thomas,

sorry for keeping you waiting. Please refer to the following documentation regarding configuring remote Ruby SDK:

https://www.jetbrains.com/help/ruby/2016.3/configuring-remote-ruby-interpreters.html 

ENV variables might be added to the Run Configuration in case you use the one for Ruby. As for the message on your screenshot, it appears to be related to the following issue:

https://youtrack.jetbrains.com/issue/IDEA-26645 

0
Comment actions Permalink

We don't have a remote interpreter in the normal sense. Our Ruby is embedded into a desktop application. We just use the remote debug protocol. Hence the need for the script that launches the application with some command line arguments. That's what I was trying to set up such that one could use local project variables for the paths to launch the script. Which is why I was trying to figure out how you get to that dialog.

0
Comment actions Permalink

Hello, Thomas,

thank you for explanations. Unfortunately at the moment there is no additional way to set environment variables apart from doing it in Run configuration (which cannot be used in case of ruby remote debug). So it would be great if you could submit your request directly to our tracker describing your use-case:

http://youtrack.jetbrains.com/issues/RUBY 

0

Please sign in to leave a comment.