Having trouble setting Ruby Interpreter for a project

Hi,

I'm pretty new to using RubyMine and I'm currently working on a Rails project that I just started using a text editor. I tried to open up my project in RubyMine but every time I do, it tells me that there is no Ruby Interpreter configured for the project and I need to configure one. I've tried everything I can think of to configure an interpreter but nothing has worked yet. My first instinct was to go to preferences/Configuring Ruby SDK and then select one of the interpreters from there. I tried selecting global 2.2.1, clicking the green checkmark, clicking apply, and then clicking OK. Nothing. I went through the other two options, as well as looking up my version of ruby on Terminal and then adding that to the list using the same steps. Nothing has worked. The strange thing is, I don't get the same error message on the other project I've loaded using RubyMine. I'm completely at a loss for what to do. Does anyone have any ideas for what might be causing this issue?

28 comments
Comment actions Permalink
Official comment

Hello, Jacob!

Could you please attach screenshot to illustrate the problem?

Comment actions Permalink

Hey Dmitry, I was able to fix the problem on my own by deleting the .idea files and reloading the project into RubyMine. Not sure what the issue was but it is fixed now. Thank you for your response. 

8
Comment actions Permalink

For anyone else experiencing this issue I believe the problem for me was that I first opened a project in webstorm and then tried opening the same project in rubymine. When I opened a subdirectory the .idea folder was created in the subdirectory and everything worked fine. Pretty annoying though that I cannot use multiple IDE for a project with multiple languages. 

3
Comment actions Permalink

Hello, Katoryo,

 

please ensure you click on a 'rbenv sdk' checkbox to choose it but not only select an item in list.

Dmitry

2
Comment actions Permalink

hi ,

I opened the project with intelij and encountered the same problem.Try to delete .idea and reopen the project.

2
Comment actions Permalink

Sorry the comment above should have read go through RubyMine menu > Preferences > Languages & Frameworks > Ruby SDK and Gems instead of through File menu > Default Settings to set the SDK for a project.

1
Comment actions Permalink

For those on 8.0.3. 143-1559, try going in through Preferences > Project: <yourproject> > Project Structure rather than through Default Settings.  None of the other suggestions on the web solved this for me.  I was trying to set the default for each project through the default settings but that doesn't work.  Set the SDK for each project the way I explain above.

0
Comment actions Permalink

Hi, I seem to having an identical problem. I tried deleting .idea/. I even was able to configure an interpreter for a specific run but not for the project as a whole. Brian Jordan, I'm on Ubuntu. I don't see a "RubyMine menu." I've been navigating to the "Ruby SDK and Gems" menu via the little banner that says "No Ruby interpreter configured for the project       Configure Ruby Interpreter"

0
Comment actions Permalink

@Ethan,

could you please specify if you still have the problem with setting the project SDK? If so please attach a screenshot from Settings | Ruby SDK and Gems.

0
Comment actions Permalink

Hi, I have the same problem.
Screenshots:

https://gyazo.com/fdb7d724afae070c6d7794de7a6e1c08

https://gyazo.com/9dae0e9220233a830bfbf85df92e8651

https://gyazo.com/aad0452fc68403679ec5cf816020826b

Every time I check the radio button on rbenv 2.3.0 and push the Apply and OK button, Rubymine does not accept this configuration.
I imported this project from the existing Ruby project.

My OS is OS X El Capitan Version 10.11.6

0
Comment actions Permalink

Dmitry's comment solved my problem. I was able to add an interpreter easily enough but had no idea that the little white circle next to it indicated "unselected". :)

0
Comment actions Permalink

Hi, I've just moved to RubyMine on my macOS High Sierra and I've got the exact same issue. I use RVM with Ruby 2.4.3 in my project. I've got `.ruby-version` file where my ruby is set to: ruby-2.4.3 and `.ruby-gemset` where 'caffio' is set.


I keep selecting my Ruby version but it doesn't get set. Any ideas how to fix it? I tried deleting `.idea` but it didn't help.

0
Comment actions Permalink

@Gregg,

could you please specify what RubyMine version are you using? Do you manage to create new projects with this SDK+gemset? How does it go in case you create a new gemset?

0
Comment actions Permalink

RubyMine 2017.3.3 and I am able to create new app using my gemset. 

0
Comment actions Permalink

Still reproducible at least on Win (w RubyMine 2020.1).  Steps:

1) Install the IDE prior to Ruby installation and  create a simple Ruby project

2) Install Ruby 2.7

3) Goto the project settings and select the newly installed interpreter.

Result: see "No Ruby interpreter configured for the project"  or somth

Deleting .idea folder helps.

 

0
Comment actions Permalink

Still seeing this issue with IntelliJ IDEA 2021.1, on macOS. After deleting the .idea folder and reopening the project, all Ruby files have a "No Ruby interpreter configured for the project" banner at the top. When I click "Configure", I can choose either "ruby-2.6.3-p62", or "rbenv: 2.6.7" in the "Project SDK" dropdown, but regardless of which I choose, the banner does not go away. No errors in the event log, and both SDKs are also listed under "Platform Settings" with all the correct paths etc.

0
Comment actions Permalink

Eric Jain, could you please attach a screenshot from File - Project Structure - Modules tab?

0
Comment actions Permalink

No errors or warnings anywhere in the project structure:

0
Comment actions Permalink

Is it a Rails or plain Ruby project? 

0
Comment actions Permalink

This is a plain Ruby project.

0
Comment actions Permalink

In this case please re-add the module by removing the configured one and invoking + | Import module | choose the same root folder | Create module from existing sources.

0
Comment actions Permalink

When I follow those steps, I don't even get the option to add the project root as a module, only vendor bundles in a subdirectory are listed (as "Java"!?)

0
Comment actions Permalink

If instead I move the .iml file from .idea/ to the project root, everything is happy...

0
Comment actions Permalink

Yes, removing .idea is a necessary step before trying to create the module again.

0
Comment actions Permalink

Thanks, Olga. Re-adding the module worked for me. After I did that, `*.iml` file has appeared and a new tab "Ruby SDK and Gems" in module settings. And the warning about missing Ruby interpreter is gone now.

I hope this info will be helpful for somebody, including the future me working on another Ruby project in a few years.

I tried deleting `.idea` directory before that, but it did not work for me. Maybe only re-adding the module itself would be enough, or maybe it got fixed only because I did both: deleted `.idea` and re-added the module. I didn't have time for experiments.

I'm running IntelliJ IDEA 2021.3 + Ruby plugin.

0
Comment actions Permalink

Petr Dorzhinov, could you please provide more details about the project you have? Is it a Rails one? How was it created and opened before?

0
Comment actions Permalink

Olga Kuvardina, just plain projects opened from a directory. Not Rails.

In one of the projects, Ruby files were added later from IDEA, after project creation. In another project, Ruby files were added externally to a subdirectory.

0
Comment actions Permalink

Petr Dorzhinov I've submitted a request for that use case so could you please add your vote to it:
https://youtrack.jetbrains.com/issue/RUBY-29195

0

Please sign in to leave a comment.