unwanted "library root" in components - behaving as excluded/library code.



This is something that has plagued my whole team for years, and I've finally decided to try to reach out to see if anything can be done, even if it's a workaround.

All the actual source code for our rails project lives in a handful of "engines" which for us live in the "components" folder. So the app looks like this:

All the areas that are colored yellow here, in other words, is where all our code is. So this causes many problems — in the Navigate>File dialog, it wants to exclude our actual code unless we hit the key again to search "non-project files". Version control only sporadically works, it likes to pretend these files are not in VCS. Also RubyMine by default adds "/components" to "Excluded" so that our code won't even be visible at all (this last thing, at least we can mitigate by each of us manually deleting it from Excluded in Project Structure).

Is there any way I can tell RubyMine that nothing inside components should be treated any differently than the stuff we have inside /app? What is happening here?

I know maybe someone here "did it wrong" a long time ago, in our choosing of "components" to put everything in, but we aren't going to be able to rearrange the whole app at this point, so I'd love to find another way.

I notice this seems to maybe be similar to this issue node people are having with node_modules in Webstorm.

I'm open to any suggestions, etc. and will be happy to share more info, current settings, etc.

Here's are my current Project Structure settings:


Comment actions Permalink

Hello Daniel,

as we discussed in the support ticket we have a corresponding request on our tracker:


There is a possible workaround proposed by one of the customers:


Comment actions Permalink

You're awesome, glad you posted it here too in case others are googling the same problem. 

I can verify that the above workaround completely fixed the issue for me.

Comment actions Permalink

This problem will always occur if you are using the Rails Engines pattern.  We are migrating a monolith app into Rails Engines and the inability to mark our engine source files as source files in RubyMine is a problem for us.  Is there anything being done about this issue?

Comment actions Permalink

I am trying to do the hack but `.idea/PROJECT.iml` no longer exist. What should I do?


Comment actions Permalink


the file should be there, PROJECT stands for the name of your project (like my_project.iml)


Please sign in to leave a comment.