help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ruby and RubyOn Rails setup - Cannot enable indentation and snippets


From: Sayth Renshaw
Subject: Re: Ruby and RubyOn Rails setup - Cannot enable indentation and snippets
Date: Wed, 2 Jan 2013 05:24:41 -0800 (PST)
User-agent: G2/1.0

Thanks for the reply

> Please open an .rb file in Emacs, evaluate (M-:) the following 
> expressions and send the values returned (for long values, you can look 
> in the *Messages* buffer, or use esk-eval-and-replace from 
> emacs-starter-kit): 

> major-mode 
> indent-line-function 
> (find-library-name "ruby-mode") 
> emacs-version

The first 3 returned no match and provided no output.
GNU Emacs 24.2.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.6.1) of 2012-11-17 on 
buildvm-13.phx2.fedoraproject.org

> I have tried several variations all done by hand by myself, emacs-starter-kit 
> with ruby loaded, prelude emacs(indents end keyword correctly but does not 
> indent the block) with ruby loaded and cannot get proper indentation, 
> snippets and/or autocompletion. I can get some bits in the installs but it is 
> not ideal. 

>> That sounds positively broken.

Should clarify I tried them individually not all at once. When one failed I 
zipped the .emacs and emacs.d up and started fresh. I have nothing other than 
my file currently.

> (require 'yasnippet-bundle) 

> try to install yasnippet from git 
> (https://github.com/capitaomorte/yasnippet/), or from Melpa, 
> mentioned in the README there. 

I used marmalade and elpa is that ok?

> (setq ruby-indent-level 4) 

>> The example at the beginning of your email has a 2-space indentation. 
>> Why are you setting this to 4?

just experimenting to try and get some indenting to work.

> rhtml-mode is also irrelevant.

I thought it was the better option of nxhtml and mumamo on linux.

> I'd like know what gave you the impression that installing 
> rails-reloaded is a good idea. Here's a recent user complaint:

Read this article from Nov 2011
http://tuxdna.wordpress.com/2011/11/12/turbocharge-your-emacs-for-ruby-on-rails-with-rinari-and-rails-reloaded/


http://stackoverflow.com/questions/13890831/emacs-rails-reloaded-does-not-work 

*shameless plug warning* 

> You can try Robe (https://github.com/dgutov/robe) for a less clever, but 
> more comprehensive completion. It falls back to "all methods in all 
> classes" approach much more often, though, and should still be 
> considered WIP. 

> --Dmitry

Thanks will look into it

Sayth



reply via email to

[Prev in Thread] Current Thread [Next in Thread]