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?

2
30 comments
Official comment

Hello, Jacob!

Could you please attach screenshot to illustrate the problem?

Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

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

@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
Avatar
Permanently deleted user

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

Hello, Katoryo,

 

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

Dmitry

2

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
Avatar
Permanently deleted user

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

@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
Avatar
Permanently deleted user

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

0
Avatar
Permanently deleted user

hi ,

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

2
Avatar
Permanently deleted user

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

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
Avatar
Permanently deleted user

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

@..., could you please attach a screenshot from File - Project Structure - Modules tab?

0
Avatar
Permanently deleted user

No errors or warnings anywhere in the project structure:

0

Is it a Rails or plain Ruby project? 

0
Avatar
Permanently deleted user

This is a plain Ruby project.

0

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
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

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

0

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

0

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

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

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

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

Sorry to ressurect an old thread but I just experienced the same issue.

I have a project in a monorepo and I initially opened it in GoLand.

Later, I opened it in Intellij (with the Ruby plugin) and all Ruby files had the no interpreter configured warning. No matter what I did, nothing made that go away.

Upon inspecting the `.idea/myproject.iml` file, I noticed it had the following:

<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
 <component name="Go" enabled="true" />
 <component name="NewModuleRootManager">
   <content url="file://$MODULE_DIR$" />
   <orderEntry type="inheritedJdk" />
   <orderEntry type="sourceFolder" forTests="false" />
 </component>
</module>

Deleting the .idea folder and re-opening the project in Intellij fixed the issue but I lost the .idea folder.

0

Hello Giovanni Tirloni,

The .idea folder should be created once you open a project that doesn't contain this folder. Could you please clarify whether the .idea folder was not recreated in your situation?

Best regards,
Karina Mokleva
The RubyMine team

0

Please sign in to leave a comment.