# Ruby contribution layer for Spacemacs ![logo](img/ruby.gif) **Table of Contents** - [Ruby contribution layer for Spacemacs](#ruby-contribution-layer-for-spacemacs) - [Description](#description) - [Install](#install) - [Ruby version manager](#ruby-version-manager) - [Key bindings](#key-bindings) - [enh-ruby-mode](#enh-ruby-mode) - [ruby-test-mode](#ruby-test-mode) ## Description This layer aims at providing support for the Ruby language using [enh-ruby-mode][] and [robe-mode][]. ## Install To use this contribution add it to your `~/.spacemacs` ```elisp (setq-default dotspacemacs-configuration-layers '(ruby) "List of contribution to load." ) ``` In order to take advantage of `robe-mode` you will probably need to install the `pry` gem. You can do that via your Gemfile: ```ruby gem 'pry' ``` or on the command line: ```shell $ gem install pry ``` ### Ruby version manager This layer supports the use of [RVM][] and [Rbenv][]. To enable it, set the `ruby-version-manager` var in your `~/.spacemacs`: ```elisp (defun dotspacemacs/init () (setq-default ruby-version-manager 'rbenv) ) ``` Possible values are `rbenv` and `rvm`. ## Key bindings ### enh-ruby-mode SPC m i start REPL SPC m g go to definition (robe-jump) SPC m d go to Documentation SPC m R reload environment (Rails) ### ruby-test-mode ruby-test-mode comes bundled with spacemacs, but this contribution adds a couple of useful keybindings: SPC m t b run test file SPC m t t run test at pointer [enh-ruby-mode]: https://github.com/zenspider/enhanced-ruby-mode [robe-mode]: https://github.com/dgutov/robe [Rbenv]: https://github.com/sstephenson/rbenv [RVM]: https://rvm.io/