Monday, 17 August 2015

Deleting/Reinstalling RubyMine on Mac OS-X

I've been upgrading my RubyMine installation for ages now as new versions and updates have occurred.

Recently I had the beginnings of Settings-Hell where settings vanished or inspections switched on or off randomly.

Furthermore I had a bunch of weird "Open-A-File-And-RM-Switches-To-A-Different-Project" issues.

So I decided it was time to whack it from my machine and re-install it.

For posterity here are the steps:

Next create a backup folder to save your existing install if anything goes wrong:

mkdir ~/RubyMineBackup
mkdir ~/RubyMineBackup/Preferences
mkdir ~/RubyMineBackup/Caches
mkdir ~/RubyMineBackup/Application\ Support
mkdir ~/RubyMineBackup/Logs
mkdir ~/RubyMineBackup/Applications

Next RubyMine and under Help->Register copy your user name and license key somewhere safe (such as the backup folder).

Now move all the preferences, caches, logs and the application itself to that backup folder:

mv ~/Library/Preferences/Rubymine70          ~/RubyMineBackup/Preferences
mv ~/Library/Preferences/Rubymine71          ~/RubyMineBackup/Preferences
mv ~/Library/Caches/RubyMine70               ~/RubyMineBackup/Caches
mv ~/Library/Caches/RubyMine71               ~/RubyMineBackup/Caches
mv ~/Library/Application\ Support/RubyMine70 ~/RubyMineBackup/Application\ Support
mv ~/Library/Application\ Support/RubyMine71 ~/RubyMineBackup/Application\ Support
mv ~/Library/Logs/RubyMine70                 ~/RubyMineBackup/Logs
mv ~/Library/Logs/RubyMine71                 ~/RubyMineBackup/Logs
mv /Applications/                ~/RubyMineBackup/Applications

(Obviously you may not need both the 70 and 71 folders. Check your machine for the folders)

Now go to JetBrains and re-download the latest version.
Start it up and enter your registration details.

FYI While starting I tend to switch to the "Darcula" theme.

Now shut RM down and do this to start RM under JDK 1.7 or newer:

vi /Applications/

Roughly line 87, you'll see this:


Change the "" value to this:


I like more memory as I often have up to 7 or 8 projects open simultaneously.

So copy the rubymine.vmoptions file:

cp /Applications/ ~/Library/Preferences/rubymine70

Now edit the ~/Library/Preferences/rubymine70rubymine.vmoptions file from this:


To this:


Now re-start RubyMine.

Once it's up install your plugins.
I use these ones:

Docker integration
Markdown support
Bootstrap 3
Git Flow Integration
GitLab integration

YMMV but mine seems to be much more stable now.