Questions tagged [ruby]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
13 views

Error (use-package): Cannot load ruby-test-mode

Installed Spacemacs and opened a ruby file. It got this error: Error (use-package): Cannot load ruby-test-mode I have researched on this issue: https://github.com/syl20bnr/spacemacs/commit/...
0
votes
0answers
16 views

Has anyone worked out configuring objed for ruby?

I am interested in trying out objed, but I find that out of the box it gets blocks and expressions wrong in ruby mode. For example, I notice that in identifying a defun it includes any comments and ...
0
votes
0answers
26 views

How to get rvm to work with projectile-compile-project and shell-command (Emacs macOS GUI)

I'm using the exec-path-from-shell package to copy my environment variables, including PATH. But shell-command (M-! which ruby RET) only finds the system ruby, not my user-local rvm ruby. Similarly, ...
0
votes
1answer
30 views

Autoloaded variable overrides the one from the init file

I added the following line to my init file to replace ruby-mode with enh-ruby-mode: (setq auto-mode-alist (mapcar (lambda (x) (if (eq (cdr x) 'ruby-mode) (cons (car ...
1
vote
1answer
81 views

How do I make emacs indent relative to the beginning of the previous line?

Here's how emacs indents e.g. Python code: a = myfun(b, c) I'd like it to be this way: a = myfun(b, c) Reasoning? If I later replace myfun with myfunction, in the first case it becomes:...
0
votes
0answers
108 views

Using emacs for ruby development with asdf version manager

I have installed a (doom) emacs to start developing with Ruby. So far I have mainly used Sublime Text but because of reasons I want to give emacs a chance. I tried Spacemacs too but uninstalled this ...
3
votes
2answers
280 views

How to make flycheck checker 'ruby-rubocop' use 'bundle exec rubocop' as executable?

I want ruby-rubocop Flycheck syntax checker to execute bundle exec rubocop instead of just rubocop. What I've tried: (setq flycheck-ruby-rubocop-executable "bundle exec rubocop") Results in ...
-1
votes
1answer
49 views

Can “kaz-yos/eval-in-repl” use the prexisting “inf-ruby” console started by robe mode

I've been using org babel to execute ruby code, works well but wrapping blocks with begin_src/end_src is cumbersome no live output - i have to wait till the whole process finishes to see output ...
0
votes
2answers
220 views

How to run a command in Emacs (rvm-use) against all current and future buffers?

I am very new to Emacs. In my case what I'm actually using is Spacemacs. I have few versions of Ruby installed in my system and I use RVM for switching between them. I'm trying to change current ...
2
votes
0answers
141 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 ...
1
vote
1answer
59 views

Add breakpoints to a source code file en masse

I'm editing a .rb file with about 3000 lines of code. This file has about 30+ statements that does a .create( create() appears in many ways: as part of another expression: puts Foo.create(...) or ...
1
vote
1answer
927 views

Problems with rvm and installed gems

I'm running emacs on Mac Os, I have settled RVM and a rails project. It works well on console: rvm list ...
2
votes
1answer
145 views

Can tangling embed code in external files? instead of recreating files

I'm building a web application using the literate programming style. At least trying to. I wanted to "hit the ground running", so I decided "make a copy" of one of the many "starter apps" https://...
0
votes
2answers
562 views

Robe mode: how to automatically require all submodules of the project?

After some fight, I was able to get some code completion and navigation from robe. Specifically, in the *pry* buffer I modified $LOAD_PATH to point at my project's source directories. However, now in ...
4
votes
1answer
899 views

Emacs robe mode for ruby, why does it need to start the server?

I've only gotten into the ruby world on emacs, and I'm looking for a lot of the good stuff I normally get with rubymine like code completion and jumping into modules. I'm attempting to use robe with ...
7
votes
3answers
1k views

Ruby always indent 2 spaces?

I would like to use 2-space indents all the time like: sidekiq_options({ retry: true }) I've tried setting .emacs.d/init.el to: (setq-default indent-tabs-mode nil) (setq-default tab-width 2) (...
0
votes
1answer
136 views

How to run rspec from the emacs shell?

I'm following an entry-level tutorial on rspec here, and I've created a very simple test at spec\lib\zombie_spec.rb: require "spec_helper" describe "A Zombie" do #Your 'examples' (tests) go here. ...
4
votes
1answer
835 views

How to return an org mode table with headings and hline from Ruby

I have the same question as this question except that I don't see how to do so other than in elisp. I am using Ruby, but I suppose the question applies to other languages as well. If I return an ...
1
vote
1answer
304 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
327 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 ...
1
vote
1answer
62 views

Running ruby files from $PATH in Eshell

I'm trying to find a way to run .rb files that are in the $PATH in Eshell by following the solution here. I added ".rb" to exec-suffixes, set eshell-force-execution to t and customized eshell-...
0
votes
1answer
86 views

How do I configure emacs to stop adding an extra closing bracket when hitting space?

I'm using web-mode to edit my erb files. When I type <% emacs (or web-mode) adds a closing %> bracket. But when I type a space after the percent sign (i.e. %), an additional %> bracket is ...
0
votes
0answers
44 views

Is there a way to colorize markdown coding partial

I want to colorize code snippet in markdown-mode. # foo.rb def foo do_something end And javascript code. // bar.js function bar(){ do_something(); } In markdown-mode the codes are colored by ...
0
votes
0answers
256 views

Strange tabbing behaviour in .erb files

Note that I use spaces for tabs. When I am working in erb files for rails such as example.js.erb or example2.html.erb, I am getting some very odd (and annoying) auto-tabbing behaviour, which I can't ...
0
votes
1answer
156 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 ...
0
votes
1answer
122 views

How to define a configurable variable in Elisp to be used in other program like Ruby?

I want to define a configurable variable in Emacs, but make it can be used in Ruby code. The situation is like here: https://github.com/zenspider/enhanced-ruby-mode/pull/68 I copy the content to ...
4
votes
2answers
620 views

projectile-rails: run the current test

While it is easy to run the whole test suite with projectile-rails, this takes too much time. I'd like to be able to run the current test (i.e., the test point is located in) with a shortcut. Is this ...