Questions tagged [ruby]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1
votes
1answer
21 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
0answers
54 views

Use Ruby console session in Org Babel

I'm able to properly start a Ruby on Rails console using inf-ruby-console-auto. Org Babel, when executing a buffer will use inf-ruby. How can I get source blocks in an Org file to invoke inf-ruby-...
0
votes
0answers
25 views

Ruby mode and/or snippets for jumping around statements

Is there currently a mode for the following examples: jumping to the end or beginning of a function the cursor is currently in. jumping around an if statement. ie from inside to the else, end and if ...
0
votes
2answers
163 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
119 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
779 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
133 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
420 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
717 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
107 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. ...
2
votes
1answer
651 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
278 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
317 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
55 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
79 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
225 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
149 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
119 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
568 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 ...