Saturday, September 08, 2012

Install Rubymine 4.5.x on Ubuntu 12.04

As you probable know NetBeans has dropped Ruby support. And now, RubyMine is one of the best Ruby IDE. Here I'd like to describe the steps for installing RubyMine on Ubuntu 12.04.

Official requirement is "Sun JDK 1.6. (OpenJDK is not supported)". I've decided to install Oracle JDK v.1.7.

I've used the next advices from "Ubuntu 12.04 – install sun jdk 6-7" (see re-post below):

Install Sun JDK 7 on Ubuntu 12.04:
Download the sun jdk 7 tar file from here
Extract the tar file:
tar -xvzf jdk-7u4-linux-x64.tar.gz
Move extracted folder to this location:
sudo mv jdk1.7.0_04 /usr/lib/jvm/
Install Update Java package (see here)
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install update-java
sudo update-java

Install new java source in system:
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_04/bin/javac 1
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_04/bin/java 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.7.0_04/bin/javaws 1
Choose default java:
sudo update-alternatives --config javac
sudo update-alternatives --config java
sudo update-alternatives --config javaws
java version test:
java -version
javac -version
Verify the symlinks all point to the new java location:
ls -la /etc/alternatives/java*
JAVA_HOME configuration
You can set JAVA_HOME in Ubuntu so simple: Edit the file .bashrc under your home directory and add the following lines: (if .bashrc is hidden click in Nautilus Menu View > Show Hidden Files)
export JAVA_HOME=/path/your/jdk
export PATH=$JAVA_HOME/bin:$PATH
Install RubyMine (see official)
Unpack the rubymine-4.5.3.tar.gz file using the following command:
tar xfz rubymine-4.5.3.tar.gz

Run from the bin sub-directory