Thursday, September 8, 2011

Is Your RubyMine Hanging?

I love RubyMine. But, recently I've been going through struggles with it in which it would hang on indexing when I started it on certain projects. I'd have to force kill RubyMine (while muttering under my breath) and go use MacVim or something else.

When I go to JetBrains' YouTRACK, I can see that a lot of RubyMine users are having similar issues.

After posting my own issues and otherwise researching the problem, it finally dawned on my that maybe my project was giving RubyMine some "really stinky files" to index. So I checked and found:
  • A 68-megabyte SQL backup file in the root of one of the projects.
  • Huge log files
  • Gawd knows what in my tmp directory
  • Big Java JAR files were in the project
Ugh. How dumb of me!

So, I did the following:
  1. If you can't start RubyMine because it hangs on indexing, kill it and then go in and purge any large files that it might be indexing on. Purge the '.idea' folder so that the next time you try to launch RubyMine on that project it has a "clean slate" to work from.
  2. Be sure that any background processes (like the Rails app you're testing using RubyMine) don't output into any folder that RubyMine indexes on.
  3. When you can successfully launch RubyMine on a project (probably by opening the project folder since you don't yet have a '.idea' folder that works), then exclude troublesome folders in your project. Do so by selecting menu item 'Preferences' -> 'Project Structure', then exclude the following folders:
    • log
    • tmp
    • Any folder that holds Java JARS or any other large binary files
  4. When you have a setup that works (by doing the following), backup your '.idea' folder so you can get back to a configuration that works.
Now my RubyMine can simultaneously keep open two large projects that it previously couldn't reliably open either.

And again I love my RubyMine!

btw, my version of RubyMine is 3.2.4. And if you still have indexing problems, you may have to reinstall RubyMine.


  1. You are a gentleman and scholar!

    As is so often the case, an *experienced* (NOT old) gets the bottom of an issue with alacrity and clarity. ;)

    - Another `Old Fart` Developer

    P.S. I like my RubyMine v3.2.4 also!

  2. Thanks for the tip. I've used this trick before with massive log files.

    ...however, currently I'm suffering a hang with the following:

    require_relative "../

    The same thing without '_relative' works fine. :(

    Have you seen this ? I'm on 4.5