The Ruby plugin extends IntelliJ IDEA with the full-scale functionality for Ruby development. The plugin supports the same functionality as RubyMine, the standalone IDE for Ruby developers. You can find more information about the supported features in the RubyMine help documentation.
Install the Ruby plugin
In the Settings/Preferences dialog Ctrl+Alt+S, select Plugins.
Find the plugin in the Marketplace and click Install.
Wait for IntelliJ IDEA to install the plugin. After that, you can start using Ruby/Rails features.