Setup – RubyMine


Overview

This is a setup tutorial to get up and running quickly with RubyMine IDE for Ruby Development.  I’m using the Ubuntu set up that I’ve explained in my “Setup – Ubuntu” article.  I’m sure that this will work for any Ubuntu environment and if you follow the steps below you’ll have your IDE installed in next to no time.

What will be covered is how to set up the RubyMine IDE to run on your Ubuntu machine.  What I’ll be going through are as follows:

  1. Pre-requisites
  2. Downloading and installing RubyMine
  3. Conclusion

Pre-requisites

Please refer to my article called “Setup – Requirements” for any pre-requisites.  I’ll keep that article live with any new packages that I think should be installed.

Downloading and installing RubyMine

To get RubyMine up and running on Ubuntu is a lot more straightforward than getting your VM and Ubuntu up and running.  All you have to do is head over to the RubyMine download site and download the latest version.  Once downloaded, open a Terminal Window and browse to the folder you just saved the install to.  In my version of the file it is called:  RubyMine-3.0.1.tar.gz.  Next you will need to tar it by running the following command:

tar -xvzf RubyMine-3.0.1.tar.gz

This should extract RubyMine to the “RubyMine-3.0.1” sub-folder.  Now that you have this done you should know that RubyMine expects the Java executable to be at “/bin/java” whereas Ubuntu puts it at “/usr/bin/java”, so to get RubyMine to work we’ll create a link to the Java install in this folder.  To do this you should run the following command:

sudo ln -s /usr/bin/java /bin/java

Once run you should see the following:

 

You may want to move your RubyMine app to a folder where your tools live.  My unpackaged tar for RubyMine lives in “~/Downloads/Ruby/IDE/ RubyMine-3.0.1”, so to explain how to do this I’m going to use my path.  You should swap this with your own path.  My command looks like:

mv ~/Downloads/Ruby/IDE/RubyMine-3.0.1 ~/Tools/RubyMine-3.0.1

Now you’ll probably want to create a Launcher for RubyMine and add it to your Desktop.  To add a Launcher to your Desktop simply open a text editor (e.g. gedit) and copy the following into it, replacing those custom values that you have for your environment:

#!/usr/bin/env xdg-open

[Desktop Entry]

Version=1.0

Type=Application

Terminal=false

Icon[en_ZA]=/home/jaco/Downloads/Ruby/IDE/RubyMine-3.0.1/bin/RMlogo.svg

Name[en_ZA]=RubyMine

Exec=/home/jaco/Downloads/Ruby/IDE/RubyMine-3.0.1/bin/rubymine.sh

Comment[en_ZA]=Runs RubyMine

Name=RubyMine

Comment=Runs RubyMine

Icon=/home/jaco/Downloads/Ruby/IDE/RubyMine-3.0.1/bin/RMlogo.svg

Once this is done save the file to your Desktop as “RubyMine.desktop”.  Now there is one more step to complete and that is to make your newly created Desktop icon executable.  To do this you have to run the following command:

chmod +x RubyMine.desktop

You should now be able to use it to launch RubyMine for you and this will also complete all the steps necessary to install RubyMine.

Conclusion

RubyMine is by far my favorite Ruby IDE.  It has strong JavaScript support and makes writing Ruby applications extremely easy and smooth.  It one of the cleanest Ruby IDEs I’ve had the pleasure of working with and the built in support for RVM is by far the best.  Now that you have your favorite Ruby IDE installed I would suggest that you head over to my article covering the install of Ruby and RVM to get up and running and write your first little Ruby app.  I hope this helps those other guys out there that have gone through so many different sites and who haven’t yet been able to get all the information to a point where they can start coding…

Enjoy!!!

  1. No comments yet.
  1. No trackbacks yet.

Leave a comment