Wednesday, December 31

Quick Fix: YAML syntax & Fixtures issue

Today I got a mail from one of my juniors who was struck with some strange problem.  
While he started playing with built in unit tests in one of his rails project, he got an error

Errno::ENOENT: No such file or directory - ramesh

  I was bit confused with this error and asked him to send me a screen shot of the error so that I can understand it better.  And here he sent the following snapshot,

Well when I got this it was very clear that the problem was with fixtures.  So I peeked into his fixtures, which is like this:


having looked into the fixture,  it was pretty clear that this is about right syntax.  And this was the quick fix which worked out:


Quickly revising back about YAML & Syntax while defining hierarchical elements would give you clear view of this quick fix.

  Anyways, it was the mistake in the indentation while defining the YAML :)

No comments: