[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ruby on Rails with emacs24
From: |
Dmitry Gutov |
Subject: |
Re: Ruby on Rails with emacs24 |
Date: |
Mon, 22 Jul 2013 03:00:19 +0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) |
Hi Markus,
> Am 21.07.2013 15:03, schrieb Markus Grunwald:
>> I'm an emacs on linux user and just starting to learn ruby on rails. I
>> was quite surprised that emacs support for RoR seems to be … well …
>> suboptimal ;)
Indeed, there's been some stagnation there.
>> There's a rails-mode, but that's it. I've found tons of information about
>> nxhtml, rinari, mumamo, rails, emacs-rails and whatnot. I read lots of
>> posts on www.emacswiki.org. But all of the sources that I got were from
>> stone age and didn't either match the current ruby nor the current emacs
>> version :(
That's the curse of EmacsWiki: old, outdated content. Reams of it!
If you enumerate the wiki pages and instructions that failed for you,
I'll try to make time to fix or remove the wrong entries.
>> Some things worked fine (flymake for example, or a few
>> shortcuts from emacs-rails) others were completely messed up like mumamo
>> which auto-inserts syntax errors and spams my *Messages* buffer.
Yeah, I wouldn't recommend nXhtml/MuMaMo.
>> Could someone please point me to current ruby on rails support on emacs?
>> Or is there only the rails-mode from emacs24?
I've no idea what's this `rails-mode' you're of. There is an old, mostly
unmaintained package called `emacs-rails', but I wouldn't recommend it
for these and some other reasons.
Rinari [0] is the current tool of choice for jumping between related files
and launching Rails console in a buffer. If you can't get it to work,
first search the issues, then maybe create a new one. Or post a question
here: https://groups.google.com/forum/#!forum/emacs-on-rails
When you're more comfortable with the setup, you can try Robe, for
somewhat better completion, docs and jump-to-definition [1]. Beware:
it's in persistent alpha state, so expect to encounter (and hopefully
report) bugs and missing features.
Also see Steve's config for how the pieces come together [2]. Maybe fork
it and use it yourself, like many people do.
Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
> You could try
>
> http://web-mode.org/
Yes, web-mode wouldn't be the worst choice for ERB. Personally, I don't
like how the codebase looks and some choices the author made (like not
using the indentation code from existing major modes, for Ruby, JS, etc,
and re-implementing indentation code from scratch; same with syntax
highlighting).
So for ERB and EJS I recommend mmm-mode [3], there are sample settings
in the comment at the top of `mmm-erb.el'. It's slower (thus less
suitable for large files), but IME more accurate.
> Don't know, how far ruby-support goes. Author of nxhtml, which did a great
> work, seems not reachable any more.
> Does somebody know about him?
Last time I've seen a message from him he we saying that he was busy.
Anyway, I don't imagine working on MuMaMo (in its current state) can be
much fun.
[0] https://github.com/eschulte/rinari
[1] https://github.com/dgutov/robe/
[2] https://github.com/purcell/emacs.d
[3] https://github.com/purcell/mmm-mode/