Saturday, October 15, 2011

RubyMine Still Hanging on Indexing? Reinstall!

Okay, so my previous posting might not be enough. After initial success, RubyMine again started to hang on reindexing, this time on several large projects.

So I did an experiment: I ran the same version of RubyMine on another MacBook Pro on the same Rails project that was failing on my first computer. It ran successfully.

Hmm!?!

I did some research on "really" removing Macintosh applications, and the following actions cleared the problem.
  1. In Finder, remove your RubyMine application from the /Applications folder.
  2. rm -rf ~/Library/Caches/RubyMine32
  3. rm -rf ~/Library/Logs/RubyMine32
  4. Reboot the affected laptop
  5. Reinstall from the RubyMine dmg file.
When I relaunched on the previously hanging project, it launched fine. When I closed and reopened the project, the quick loading reflected the successfully-generated index files.

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.