Archive for the ‘Feature’ Category

Synchronizing RubyMine Configuration using IDEA Server

Monday, December 28th, 2009

RubyMine license allows using the IDE from different computers (non-simultaneously). And once you have more than one IDE installation, you are in need to configure them all. But most likely you’d want them all to be configured similarly. So, to simplify this task, we’ve made the so called ‘IDEA Server plugin’ compatible with RubyMine 2.x

The plugin allows to synchronize IDE settings between installations, so setting up a new workstation is the matter of several clicks with it.

To install the plugin, open IDE Settings | Plugins, select the ‘Available’ tab, find the ‘Idea Server Plugin’ in the list and install it. Then restart RubyMine and you will get the Settings Server login prompt on startup.

For more information about the plugin and how it works please refer to Synchronizing IntelliJ IDEA Settings using IDEA Server document in our knowledge base.



If you find some problems or have additional questions about this functionality — let us know.

Note: To use the plugin you need RubyMine 2.0.1 or later.

Develop with pleasure,
-JetBrains RubyMine Team

RubyMine TipCast: Find Files like a Pro

Tuesday, December 1st, 2009

RubyMine provides numerous options to navigate from file to file:

  • ‘Go to declaration’ (⌘B/Ctrl+B)
  • Navigate to Rails… (⌥ ⇧ N/Alt+Shift+N)
  • ⌘ Mouse Click/Ctrl+Mouse Click or mouse middle button click
  • and many others.

But sometimes you just need to open a particular file that you know. Ob course, you can open if from the Project view but there is a much faster way — the ‘Go to file’ ⌘⇧N/Ctrl+Shift+N.

The ‘Go to file’ is plain simple, but has some advanced features we’d like to show today. To make the presentation more interactive, here is a short video (view in a new window):



Check other RubyMine demos

We’d like to know what you want to see in the Tipcast series. Please let us know in the comments.

JetBrains TeamCity — Continuous Integration For Ruby

Friday, November 27th, 2009

There’s been lots of talks about Ruby and Rails being Agile. One of the core agile practices is Continuous Integration. And JetBrains offers its continuous integration and build management system named TeamCity.

One of the many RubyMine 2.0 additions is IDE integration with TeamCity. So, here we want to review how a Ruby/Rails project can be set up in TeamCity and what additional benefits the IDE integration brings.

We’ll not be giving a full tutorial on TeamCity setup and configuration here, we’ll link to TeamCity docs instead, which are very good, by the way. We recommend using TeamCity 5.0 as it has the ‘Rake runner’ bundled and RubyMine only supports this version.

So, after you install TeamCity, launch it, direct your browser to it, (e.g. http://localhost:8111), log in and begin adding your project to start building it.

First, create a new project, and then create a build configuration that actually configures the build process. Follow the configuration steps.

For running Ruby builds you need to select the right build runner. Most probably you want to choose Rake Runner.

Do not forget to configure test reporters for the build, so you get nice stats for all types of tests (RSpec, Cucumber, Shoulda, etc.).

Once the build configuration is ready you can ‘Run’ it to get first results.

Here are some cool things about TeamCity:

  • Instant build results — you do not need the build to finish to know some test have failed
  • Build time estimation — TeamCity tells you how long the build will run
  • Misc. build triggers — launch build on VCS commit, by schedule, or dependency from other build configuration
  • Pre-tested commit — TeamCity will perform VCS check-in of your changes only after a successful build with them (e.g. no tests fail).
  • Assign/take responsibility — responsibility can be set for a build configuration problems or failed tests.
  • Multiple notification ways such as e-mail, Jabber, RSS, IDE plugin, tray notifier.
  • Multiple supported VCS — SVN, Git, Perforce, CVS, Mercurial, etc.
  • Open source code in IDE from TeamCity web UI (works for RubyMine, IntelliJ IDEA, Eclipse, etc.)
  • View VCS check-in diffs in TeamCity web UI

Additionally, you can add custom reports to TeamCity UI. For example, if you have RCov set-up analyzing your code, you can embed its HTML report as another tab (see screenshot below, click to enlarge).

Review some TeamCity screenshots made from Cucumber and other projects builds:

So, your builds should up and running already. Time to see how we can work with TeamCity from RubyMine. Let’s install the IDE plugin.

For this, in TeamCity UI go to My Settings & Tools and from TeamCity Tools section, download the IntelliJ Platform plugin. For plugin installation instructions refer to Installing Plugin Manually.

When you relaunch RubyMine you will notice a new icon in the status bar and a new TeamCity menu item. You need to configure the server and log in to it to see your builds. Make sure you configure watched projects/builds under IDE Notifier in Watched Builds and Notifications section.

Now, with the IDE plugin, you can:

  • Start/stop builds from RubyMine
  • View build stats from RubyMine
  • Receive build results notifications in the IDE

As always, we look forward to hear your thoughts on this. Welcome to our issue tracker and discussion forum. There’s also TeamCIty forum where you can ask questions about the system
To be continued..

What’s mining: search for duplicates in Ruby

Wednesday, September 16th, 2009

Hi all,

It is always a pleasure to tell about new features! This time I’m glad to announce a brand new one that is coming in next RubyMine 1.5 EAP — “Locate duplicates”. It is another useful tool in RubyMine’s code analysis arsenal. Everyone has once faced with copy-paste problem: when you don’t use a refactoring such as extract method/module/variable for some reason but just do copy&paste. Your code begins to “smell”.

Locate duplicates is a helpful feature designed to assist you in writing safe, fast and error-free code.

Use Code | Locate Duplicates menu item to start it. You’ll see the  Code Duplication Analysis Settings dialog where you can tune the intelligibility of the search.

Local variables, Fields, Methods, Literals can be anonymized. Do not show duplicates simpler than and Anonymize uncommon subexpressions simpler than options operate with some heuristic values complexity of found fragments of code. These thresholds are used to cut off obvious duplicates like local variables, field etc. You can change them later, but the defaults should fit pretty good for a start.

Results of this search are shown in a familiar diff view with code fragments to inspect the results.

You are welcome to try this in coming EAP build.

-JetBrains RubyMine Team

What’s mining: Rails i18n support

Wednesday, August 26th, 2009

Hello folks,

Today we are going to tell you about forthcoming Rails i18n support in RubyMine. This functionality is planned for RubyMine 1.5 release in our roadmap, and you will be able to try it in next EAP builds. Feature is under development so comments, suggestions and even feature requests are very welcome :)

At the moment RubyMine supports the following:

  • Resolve and completion for property keys with quick navigation info. Autocompletion for property keys:
  • Go to declaration action:
  • Convenient usages search for property keys
  • Rename property key in locale files with all usages
  • Rails conventions for templates key prefixes
  • Inspection with quickfix for undefined property key. RubyMine offers to apply “Create property” quickfix.

Not all the desired functionality is implemented yet, but we are working hard on it. Just want to mention some of the further feautures:

  • Duplicate property key Inspection
  • Intention to i18nize plain text value
  • Check whether all the keys present in given locale file
  • your suggestions?

Please do not hesistate and let us know your opinion about all this at our forum at: http://www.jetbrains.net/devnet/community/ruby

-JetBrains RubyMine Team

Extending RubyMine with Ruby

Friday, August 14th, 2009

As we have already mentioned in RubyMine Roadmap, the forthcoming RubyMine 1.5 will provide Ruby API for extending the IDE in idiomatic Ruby (no Java or XML). For this purpose the latest RubyMine EAP has built-in RubyMine Extensions Manager for your own extension scripts.

Using Extensions Manager you can enable/disable the pre-installed scripts or add your own ones. Use ‘Add’ and ‘Remove’ buttons to manage your own script folders. Newly added scripts under script folders are considered as enabled by default.

API documentation isn’t yet finished, for now please refer to http://www.jetbrains.net/devnet/docs/DOC-1161. But we will surely get it published before RubyMine 1.5 release.

- JetBrains RubyMine Team

Execute selected code in console

Monday, August 10th, 2009

IRB console in RubyMine is a quick way to execute Ruby code.

Here is a quick hint on how you can quickly execute some code from the editor.

  1. Tools | Start the IRB console
  2. Select a code
  3. Tools | Load selected text/file in IRB console (⌥⇧L/Alt+Shift+L)

As you may have guessed from the menu item title, you can execute the whole file, without selecting any code. Try it!

Have you tried RubyMine 1.5 EAP already? Ruby 1.9, improved Cucumber support — already there, with Shoulda and new refactorings coming shortly! Try today!

5 keyboard shortcuts to get familiar with

Monday, August 3rd, 2009

You probably know RubyMine bases on IntelliJ platform and gets lots of cool features from the platform. Going even further, I will base this post on a post in IntelliJ IDEA blog. The author of the original posting has permitted it.

We truly believe in the power of keyboard shortcuts, but some of them may be overlooked. Here are 5 combinations we advice you to try and get familiar with.

Ctrl+W & Ctrl+Shift+W: When it comes to precisely selecting a value, expression, statement or any other block of code, these shortcuts are a real killer. Just try it to see how quicker it works than the traditional Ctrl+Shift+NavKeys combo.

⌥F11/Ctrl+Shift+F12: This hides everything but the editor and so leaves you tête à tête with the code.

⌃⌥⇧Up/Down/Ctrl+Alt+Shift+Up/Down: If you are using Version Control integration, you gonna love this one — it quickly navigates you between changes in a file.

⌥F1/Alt+F1: This simple hotkey summons ‘Select target’ list allowing you instantly select the currently edited file in one of IDE views such as Project view, Changes view, etc. Comes quite useful especially on big projects and keeps you hands on the keyboard.


Ctrl+Tab, Delete: Pressing Delete while the Switcher is open (Ctrl+Tab) allows closing editor tabs and hiding tool windows
NOTE: This one only works in RubyMine 1.5 EAP since build 1287.

RubyMine 1.5 allows more lightweight UI

Friday, July 24th, 2009

Have you ever wanted to see more code and less UI in RubyMine? With the latest RubyMine 1.5 EAP build you can make RubyMine UI more lightweight.

RubyMine has always allowed hiding almost any UI element. But one thing you probably would not want to do is turning off the toolbar. Of course you can turn it off but you’d loose the ability to select a Run/Debug configuration.

The latest RubyMine EAP build lets you select and start Run/Debug configurations without using the toolbar.

So, here is what you do:

  1. Open ‘View’ menu and uncheck the ‘Toolbar’ option to hide the toolbar (optional step)
  2. Remember the shortcut for opening the new popup ⌃⌘F8/Alt+Shift+F10 (⌘⇧R for TextMate keymap)

You will see a popup that lists all configurations and allows you to:

  • Choose a configuration and Run it — simply press Enter
  • Choose a configuration and Debug it — press Shift+Enter
  • Start typing to filter the configurations
  • Edit all configurations or a particular one in the usual screen.

Looks like an excellent time and screen space saver! Which is quite a big deal for our wide-screen monitors, right?

Download RubyMine 1.5 EAP and let us know your opinion on this and other new features.

What’s mining: Ruby support within HAML

Friday, July 3rd, 2009

As you may know RubyMine provides outstanding Ruby code editing support in Erb files (RHTML). So, salute another language with Ruby code support: HAML. Familiar things like on the fly error highlighting, code completion, resolve, code folding, and much more are here to boost your productivity! And of course RubyMine is aware of HAML semantics and ruby blocks are recognized correctly according to indentations.

Here, in support of the words, we have some screenshots:

Ruby code completion:
    Ruby code folding:

This stuff will be available in RubyMine 1.5 EAP coming soon! Stay in touch!

-JetBrains RubyMine Team