Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

The tag has no usage guidance.

0
votes
0answers
13 views

Connect company to external ruby process

Recently, I used more and more pry to develop emacs and open Emacs using the command edit. The EDITOR variable is set to an emacsclient, that I had the server started with an inf-ruby buffer and robe-...
1
vote
1answer
64 views

jump to ruby symbol with emacs

In a ruby project. when point is at a ruby symbol, for example UserCart::PromotionService.new(blah blah how can I jump to the definition of that class/module.
1
vote
1answer
26 views

Indentation incorrect in line with `if:` or `unless:` as options, not directives

In some of my ruby files, mostly Rails Model files, I often encounter lines such as: validates :thing_id, presence: { message: '^Choose a Thing' }, on: :create, unless: Proc.new { |obj| ......
1
vote
0answers
44 views

Inconsistent hash indentation in ruby-mode

I've noticed that indent-region behaves this way in ruby-mode: { down_payment: 40.00, payment_day: 10 } { "down_payment": 40.00, "payment_day": 10 } Both are valid Ruby ...
2
votes
1answer
160 views

how do you fold/unfold complex ruby code blocks

I found a snippet that let's me fold bad(large) blocks of code (add-hook 'ruby-mode-hook (lambda () (hs-minor-mode))) (eval-after-load "hideshow" '(add-to-list 'hs-special-modes-alist ...
0
votes
0answers
17 views

Align closing bracket of multiline array left when used as method argument

When I pass a multiline array as an argument, I'd prefer that the elements were aligned like this safe_join([ "abc", "def", ]) But ruby-mode indents it like this: safe_join([ "abc", ...
0
votes
2answers
64 views

how do you turn off smart brackets//parenthesis in prelude

I hate it when prelude auto adds the ending } when I type { (this is ruby mode) This is very common, for example typing ( auto adds a ) This is really annoying when trying to edit code, or a lot of ...
0
votes
0answers
150 views

Help with debugging emacs, when opening routes.rb from rails applications

I'm using emacs for my every day tasks, I started more or less 4 years ago, and now I'm very happy with emacs. maybe I have a lot of plugins working together. This is my-ruby configuration file I ...
0
votes
1answer
84 views

Upgrading a built-in package

My system has emacs 24.5.1 with a built-in ruby-mode. I want to update to the latest ruby-mode from emacs 25.1 in order to get improved syntax highlighting. Upgrading the entire emacs installation is ...
1
vote
1answer
221 views

comint-mode + vagrant

Disclaimer: Pretty new to Emacs and running Spacemacs, have no idea what I'm doing with elisp. We run all our projects under vagrant, so I'm interested in getting some things, such as inf-ruby-mode ...
0
votes
0answers
261 views

ruby-mode not indenting correctly?

I am using emacs 24.4 in -nw terminal mode. I know ruby-mode is included but I cannot get the following snippet to indent correctly in a .rb file. private def end Instead I can only get ...
4
votes
2answers
340 views

Division sometimes breaks syntax highlighting in ruby-mode

Interesting bug in ruby-mode. When a variable called index is followed by a slash /, syntax highlighting breaks. Here's a screenshot to show you what I mean: I'm not really sure how to file a ...
0
votes
2answers
69 views

Navigating rspec files

Usually I use incremental searching to find what I'm looking for. Also, in general I write very small methods that easily fit in one screen. So before now I have had little use for any sort of code-...
0
votes
1answer
137 views

Vagrant Integration in rspec-mode

I have a vagrant machine for my Rails project. I would like to integrate Emacs with rspec, currently done by hand on a terminal (inside the vagrant machine). If I run rspec-verify-all Emacs will try ...
3
votes
1answer
296 views

Include vendor's tags for ruby-mode and ggtags

I'm trying to install and configure the ggtags package. Primarily, I use it for a ruby on rails projects (enh-ruby-mode). I can generate ctags including all vendor's files for my project with the ...
2
votes
1answer
136 views

Use hippie-expand to complete ruby symbols without prefix

I am an avid hippie-expand user but I find it annoying that it natively doesn't complete ruby symbols without the prefix. For example (cursor is |): class ApplicationController < ActionController::...
1
vote
1answer
138 views

How to hide heredoc block in ruby-mode?

In ruby-mode, using hs-minor-mode (hideshow) you can hide almost any block of code, but heredocs. I've tried adding "LONG_HEREDOC" to hs-special-modes-alist, but it didn't worked: (eval-after-load "...
2
votes
1answer
3k views

Symbol's value as variable is void: company-backends

I'm trying to setup robe for Rails development. It needs company mode and I have some issues with it: Have following in init.el: ;; robe, documentation lookup and completion for Ruby (require 'robe) (...
2
votes
1answer
335 views

Emacs indent with tabs to 2 columns

Current with C, Javascript, Ruby, etc. when inserting a block with { <RETURN>, Emacs automatically indents the next line, but it does so with spaces. How do I change this behavior to tab ...
6
votes
2answers
538 views

Do not align nested calls when using ruby-smie

When using the newly added ruby formatting functionality I face the following problem: I would really like for my rspec code to be formatted like the following: it do is_expected.to match(/\[Error\...
-2
votes
2answers
107 views

Indispensable emacs modes for rails? [closed]

Are there definitive must-have modes when developing on rails, I usually get absorbed on the sea of different packages out there, is there some place that list them?
3
votes
0answers
626 views

Why doesn't auto-complete work in ruby-mode?

I have spent several days trying to debug auto-complete, it is working properly in Elisp mode, but when I go in Ruby mode it stops working. auto-complete-mode runs successfully, but the menu of ...