Ruby and JRuby Support
IntelliJ IDEA supports Ruby 1.8.6 and JRuby for running Ruby applications, with with cross-resolution of classes between Ruby and Java.
Smart, scope based JRuby-aware 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
- Local variable type inference
JRuby additional supports includes:
- Autocompletion and resolve for Java classes and methods in ruby scripts
- Support for alternative method naming (setSize -> set_size)
- Support for Ruby-style getters and setters
Also the plugin allows to specify additional load path directories, files from which will be parsed and included in resolve and completion suggestions.
Ruby code syntax and error highlighting
IntelliJ IDEA provides automatic Ruby code syntax and error highlighting for statements, keywords, comments and other language elements.
Automatic Ruby code styling
IntelliJ IDEA supports automatic Ruby code styling, with brace matching and folding, custom formatting, indentation and TODO marks.
Smart Ruby code analysis
IntelliJ IDEA performs on-the-fly code analysis and offers one-click quick-fixes for spotted problems.
Various Ruby-aware Intention Actions are available for transforming the source code.
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 (Ctrl+F12)
- Go to Ruby class(Ctrl+N), file(Ctrl+Shift+N), symbol(Ctrl+Alt+Shift+N) and declaration actions
- Quick declaration view(Ctrl+Shift+I), context(Alt+Q) and method parameter(Ctrl+P) info
- Ruby code documentation lookup(Ctrl+Q) with hyperlinks and navigation
- Quick overriding of classes, modules and methods with active navigation gutters
- Ruby code usage search for local variables, method parameters, class fields and constants
- Stack trace analysis with one-click Ruby code navigation (for console output or "Analyze Stack trace" dialog)
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
- Implement method (for Ruby implemented Java interfaces)
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
Miscellaneous
- More than 50 Ruby and RSpec live templates
- TODO tasks support in comments
- Plugin page with plugin version, build and useful links in setting
Rails Support
The plugin supports Ruby On Rails applications (which are configured as Ruby module with Rails facet) and JRuby on Rails applications (which are configured as Java modules with JRuby and Rails facets).
RHTML support
IntelliJ IDEA fully supports RHTML, with smart code completion for both Ruby, JavaScript code and 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.
YAML Support
The plugin supports syntax highlighting and error highlighting for YAML files, based on the JvYAML library by Ola Bini.
Advanced Rails project navigation
IntelliJ IDEA features the smart Rails project navigation with dedicated structure views, one-click switching between views, controllers, layouts and quick context menus for calling Rake tasks.
Smart resolve and autocompletion for Rails magic
- Support for Rails controllers, view, helpers, models and migrations
- Support for parameters of following methods: url_for, render, stylesheet_link_tag, javascript_include_tag, paginate, helper, form_tag
Dedicated RubyOnRails run configurations
- Support for Rails servers: WEBrick, Mongrel, lighthttpd, etc
- Desired environment selection (development/test/production)
- Opportunity to run a arbitrary Rails script (Tools | ROR Plugin | Run Rails script...)
Miscellaneous
- Automated generation of Rails skeleton applications
- Rake tasks from context menu
- Advanced tools for developing Rails generators, models, etc
- Quick insert action in action controller
Testing frameworks support
IntelliJ IDEA supports testing for Ruby projects, with:
- Quick tests launching for a specified method, class or set of tests
- Support for RSpec and Test::Unit frameworks
Continuous integration and build management server support
Rake runner plugin provides support for Rake build language, RSpec and Test::Unit testing frameworks.
For more details see Rake runner plugin for TeamCity buildserver