Home> Products> topnavProduct.jsp> Features & Screenshots> Technologies & Frameworks

Ruby on Rails IDE


RubyMine natively supports all major Ruby on Rails development practices and offers the wide variety of assisting features that automate the whole process and make the Rails development simpler and more effective.

RubyMine supports Rails framework from version 1.2 to the latest 2.3.x.

Ruby on Rails Project View

RubyMine automatically generates Rails application skeletons for new project and can open existing Rails projects.
RubyMine: Rails Project View Rails Project View (click to enlarge) The special "Rails" Project view shows logical project structure displaying Controllers, Models, Views, DB migrations, etc. and providing quick access to these items and their contents such as controller methods, associated and partial views, etc.

View "Open your first project" demo (0:30).

Advanced Rails Project Navigation

RubyMine features the smart Rails project navigation with one-click switching between models, views and controllers and quick actions for executing Rake tasks.

You can use the one-click active icons to quickly navigate around your application:

  • Switch to view / partial view
  • Switch to action
  • Switch to controller

Switch from Controller to appropriate View Switch from View to the action in an appropriate Controller

Intelligent "Navigate to Rails" options allows quick navigation between appropriate Rails model, controller, view, helper, unit/functional/spec test from any location (Go To | Navigate to Rails, Alt+Shift+N).

Navigate to Rails

Model Dependency Diagram

Model Dependency diagram displays all project models with their attributes and associations. It allows taking an overview on project structure and navigating to the needed code.

  • You can quickly navigate from diagram to a model or an association.
  • Navigate to the model's Controller, Helper or Test using the quick Navigate to Rails option.
RubyMine: Model Dependency DIagram (click to enlarge) Model Dependency DIagram (click to enlarge)

Autocompletion for Rails controllers, helpers and views

  • Rails specific code completion for Controllers, Helpers, Views
  • DB Fields defined in migrations are recognized and shown in the completion lists
  • DB associations defined in Models (has_one, has_many, etc.) are recognized and shown in the completion lists
  • Completion for find_by_* methods is supported
  • Completion specific for methods like url_for, redirect_to, etc.
  • Completion and resolution of methods defined by named routes and resource routes
  • Rails db fields code completion rails find by completion rails db links completion rails redirect to completion
More on Rails-specific code completion in RubyMine Blog.

Rails-aware Refactorings

In addition to Ruby-generic refactorings, every code refactoring available in RubyMine is also aware about Ruby on Rails making it easier to perform project-wide changes. For example, for the Rename refactoring:

  • renaming a controller will also rename helper, views, RSpec and Test::Unit tests
  • Model Dependency Diagram demo Action Rename refactoring (1:20)
  • renaming an action method will rename corresponding view templates files, will update references to action method/view templates from rails calls such as render, redirect, etc; will rename RSpec test file for action's view.
  • a view template rename will also rename the corresponding action, references to action method/view templates and RSpec test file
  • view's RSpec test rename will only rename the test file.

More refactoring demos »
- Introduce & inline variable
- Extract method, etc.
View Now »

There are also Rails specific refactorings such as "Extract Partial" allowing to move part or view file code to a separate partial view.

Rails i18n (internationalization)

RubyMine offers Rails i18n support with coding assistance for multi-language applications development.

Preparing your existing applications for multi-language auditory is a matter of executing a quick-fix on its string literals. Strings are auto-copied to a corresponding YML file and replaced with Rails translate() method.

RubyMine: Rails i18n. Internationalize string RubyMine: Rails i18n. Create i18n property

Also proivided: quick navigation to property definitions, property keys usages search and rename refactoring.

RubyMine: Rails i18n. Go to property definition RubyMine: Rails i18n. Property completion
Read more on i18 support in RubyMine Blog

Rails Code Generation

For adding new Rails entities such as models, controllers, scaffolds, etc. to your projects RubyMine provides quick and context sensitive access to Rails generators with a convenient UI.

  • rails code generation Convenient UI for Rails generators

RHTML Editing

RubyMine fully supports RHTML layouts editing, with automatic RHTML code styling and formatting, with braces, folding, syntax highlighting and smart code completion for both Ruby, JavaScript code, HTML tags and embedded CSS.

RHTML code styling and formatting with braces and syntax highlighting

RubyMine performs RHTML-aware code inspections and suggests quick-fixes such as:

  • Surround With (Ctrl+Alt+T): surround a fragment of RHTML with a tag or a Ruby control statement.
  • Smart Enter (Ctrl+Shift+Enter): insert the closing <% end %> tag for a control statement.
  • RHTML smart code completion
Browser preview context toolbar

Context toolbar allows quick opening the page preview in a browser or in the embedded Web Preview.

RubyMine allows setting breakpoints in RHTML code for debugging Erb blocks.

For more details, see JavaScript editor and HTML and CSS editor features descriptions.

HAML and SASS Editing

Develop HAML Rails views in RubyMine with:

  • Syntax highlighting for HAML markup and the injected Ruby code.
  • Coding assistance for Ruby code inside HAML (completion, navigation, etc.)
  • Controller-view navigation gutter for quick switching between the files.
HAML syntax highlighting

RubyMine provides SASS (Syntactically Awesome Stylesheets) support with syntax highlighting, indentation-aware folding etc. Read more on Sass support in RubyMine Blog

YAML Support

RubyMine supports syntax and error highlighting for YAML files.

Completely reworked YAML editing support allows comfortable editing of internationalization property files (*.yml).

rails yaml support

to the top

Download RubyMine (30-day fully functional evaluation).