Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recommendation for Emacs/Ruby setup

Tags:

emacs

ruby

So far I'm very happy with my Clojure/Emacs setup but failed to come even close to this experience when using Ruby. I tried the enhanced ruby mode (no syntax highlighting) and robe (which fails with a syntax error as soon as the console is started). I would really appreciate any tips where to find some proper guidelines on how to configure Emacs for Ruby.

BTW: I do not need any Rails support. Just plain Ruby support.

like image 368
rogergl Avatar asked Dec 22 '13 13:12

rogergl


2 Answers

I find the following setup quite good:

  • ruby-mode from Emacs 24.4 or above - it's quite an improvement over the one in Emacs 24.3
  • inf-ruby - a way to run irb/pry inside Emacs
  • smartparens - superb handling of delimiters like (), [], {}, do/end, etc.
  • yari - ri interface for Emacs
  • ruby-tools - adds commands to turn a string to symbol, symbol to string, single to double quote string, double to single quote string, clear string, interpolate and more...
  • flycheck + RuboCop for on-the-fly linting and code style checking

AFAIK many rubyists are also using yasnippet. I've given up on trying to find a good "intelli-sense" alternative for Ruby in Emacs, but other than that I'd say the above setup is quite solid. It's pretty much what you'd get by using Prelude's Ruby module.

like image 167
Bozhidar Batsov Avatar answered Oct 03 '22 23:10

Bozhidar Batsov


This isn't a real answer since I'm not a Ruby user but I am tied into the Emacs community and these things have shown up on my radar before

  • http://www.emacswiki.org/emacs/RubyLanguage (the wiki, although sometimes out of date, is a good place to start from for queries like this).
  • http://crypt.codemancers.com/posts/2013-09-26-setting-up-emacs-as-development-environment-on-osx/ was recently on HN and has a detailed setup.
  • Sacha Chua's chat with Avdi Grimm mentions a few of the tools that Avdi uses for his Ruby work.
like image 34
Noufal Ibrahim Avatar answered Oct 04 '22 00:10

Noufal Ibrahim