Home> Products> IntelliJ IDEA> Features & Screenshots> Ruby/ JRuby & Rails

Ruby, JRuby and Rails

You can get Ruby plug-in from Plugins Repository or via IntelliJ IDEA Plug-in Manager.

JetBrains RubyMine »
Dedicated Ruby on Rails IDE



IntelliJ IDEA supports Ruby, JRuby and Ruby on Rails, the open source Ruby framework, for productive Ruby on Rails application development.

IntelliJ IDEA is the smart Ruby and Ruby on Rails application development environment, with intelligent Ruby code editor, which provides the complete Ruby coding assistance, with smart Ruby code completion, Ruby syntax highlighting and other productivity-aimed features: on-the-fly code inspections, error highlighting, quick-fixes, refactorings, and intention actions. Plus, the built-in unit testing, JRuby support, RDoc lookup and live templates, and more.

Live Demo: Productive Ruby Development with IntelliJ IDEA Live Demo: IntelliJ IDEA on Rails

Ruby and JRuby Support

IntelliJ IDEA supports JRuby for running Ruby applications, with cross-resolution of classes between Ruby and Java.

Ruby debugger, capable of debugging Ruby and Rails applications and Rake tasks

  • Works with Matz Ruby and JRuby interpreters
  • Supports breakpoints both in Ruby files and in view templates
  • Call stack, local and global variables, watches and threads view Rails Debugger
    Click to enlarge
  • Expression evaluation and smart display of arrays and hashes with highlighting of recently modified values

to the top

  • Ruby code syntax and error highlighting
    IntelliJ IDEA provides automatic Ruby code syntax and error highlighting for statements, keywords, comments and other language elements.
  • Ruby code syntax and error highlighting, with brace matching and folding
  • Automatic Ruby code styling
    IntelliJ IDEA supports automatic Ruby code styling, with brace matching and folding, custom formatting, indentation and TODO marks.

to the top

Advanced Ruby code and project navigation

With IntelliJ IDEA you can navigate your Ruby projects in a variety of ways, view and examine documentation, method parameters, context info, etc.

  • Ruby-aware structure view, quick structure popup
  • Go to Ruby class, file, symbol and declaration actions
  • Go to Ruby class, file, symbol and declaration actions
  • Quick declaration view, context and method parameter info
  • Quick declaration view, context and method parameter info
  • Ruby code documentation lookup with hyperlinks and navigation
  • Ruby code documentation lookup with hyperlinks and navigation
  • Quick overriding of classes, modules and methods with active navigation gutters
  • Quick overriding of classes, modules and methods with active navigation gutters
  • Ruby code usage search for local variables, method parameters, class fields and constants
  • Ruby code usage search for local variables, method parameters, class fields and constants
  • Goto Super (Ctrl-U), Goto Type Declaration (Ctrl-Shift-B) navigation actions
  • Supertypes hierarchy for Ruby classes (Ctrl-H)
  • Previous/Next Method navigation (Alt-Up/Down)

to the top

Smart, scope based Ruby code completion

IntelliJ IDEA provides intelligent code completion for Ruby language, which includes:

  • Automatic completion of built-in methods
  • Smart Ruby statements completion
  • Completion and automatic resolution in require and load calls
  • Smart, scope based Ruby code completion
  • Type inference-aware code completion
    IntelliJ IDEA dynamically checks types for variables and method return values when you are typing the code and offers the according coding assistance.

to the top

Smart Ruby code analysis

IntelliJ IDEA performs on-the-fly code analysis and offers one-click quick-fixes for spotted problems.

On-the-fly Ruby code analysis with quick-fixes

Various Ruby-aware Intention Actions are available for transforming the source code.

JRuby and Ruby-aware intention actions

  • Type inference for block variables within block calls Type Inference For Yield
  • Incomplete hashes detection (with value missing after =>)
  • Spot unreachable code
    Unreachable Code

to the top

Multiple Ruby-aware refactorings

IntelliJ IDEA features the rich set of Ruby-aware refactorings, all ready to help you transform your project code quickly and efficiently:

  • Rename refactoring (for classes, methods, variables, constants, method params etc.)
  • Introduce variable
  • Override method

to the top

JRuby Support

JRuby code completion

  • Alternative method naming (both boolean_value and booleanValue styles supported)
  • Alternative method naming
  • Both Ruby and Java-style getters and setters (both setSize and size = styles supported)
  • Ruby and Java-style getters and setters
  • JRuby code completion

to the top

JRuby code inspections with instant quick-fixes

IntelliJ IDEA checks your Ruby code on-the-fly, highlighting various kinds of errors. unimplemented methods are highlighted and a quickfix

For all problems discovered, IntelliJ IDEA offers automatic quick-fixes.

implemented methods are highlighted and a quickfix

to the top

Rails Support

RHTML support

IntelliJ IDEA fully supports RHTML, with smart code completion for both Ruby, JavaScript code and HTML tags.

RHTML support, with smart code completion, including HTML tags

It also provides automatic RHTML code styling and formatting, with braces and syntax highlighting and various RHTML-aware code inspections and quick-fixes.

RHTML code style and formatting, with braces and syntax highlighting

  • Improved support for embedded CSS in RHTML files
  • Surround With (Ctrl-Alt-T) can enclose and RHTML fragment with an XML tag or with a Ruby control statement
  • Smart Enter (Ctrl-Shift-Enter) can inserts the closing <% end %> tag for a control statement Smart Enter Before After

to the top

YAML Support

The plugin now supports syntax highlighting and error highlighting for YAML files, based on the JvYAML library.

to the top

Advanced Rails project navigation

IntelliJ IDEA features the smart Rails project navigation with dedicated structure views, one-click switching between views and controllers and quick context menus for calling Rake tasks.

Advanced Rails project view with navigation

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

  • Switch to view
  • Rails switch to view
  • Switch to action
  • Rails switch to action
  • Switch to layout
  • Switch to controller
  • Navigation between model, controller, helper, unit/functional/RSpec tests (Alt-Shift-N) Rails Navigation Beetwen Model Controller etc
  • Context toolbar for opening the corresponding page in a browser from Rails views Contex Toolbar To Open Rails View In Browser
  • View navigation actions suggest to create a view if none is found (Ctrl-Alt-W)

to the top

Autocompletion for rails controllers, helpers and views

  • Rails specific completion for Controllers, Helpers, Views
  • Completion specific for methods like url_for, redirect_to, etc.
  • code completion specific for methods

to the top

Rails code generation

  • Automated generation of Rails skeleton applications
  • Advanced tools for developing Rails generators, models, etc
  • Quick insert action in action controller
  • Quick insert action in action controller

Testing Support

IntelliJ IDEA supports unit testing for Ruby projects, with:

  • Quick tests launching for a specified method, class or set of tests
  • Support for RSpec and Test::Unit frameworks

refactoring

GUI runner for Test::Unit and RSpec tests with support for Rake tasks.

Test Runner
Click to enlarge

to the top

Miscellaneuos

  • Stack trace analysis with one-click Ruby code navigation
  • More than 50 Ruby and RSpec live templates
  • Plugin page with plugin version, build and useful links in setting
  • Dedicated Ruby run configuration and quick script execution
    IntelliJ IDEA lets you quickly run your scripts through dedicated configuration, plus supports shortcuts for Rake tasks, generators, RSpec, etc.
  • Dedicated Rails run configurations with support for standard Rails servers (WEBrick, Mongrel, etc)
  • Convenient view for Rails server logs Rails Log With Ansi Colors

to the top