# Rake argument error

**URL:** <https://www.ruby-forum.com/t/rake-argument-error/185834>\
**Category:** Rails\
**Created:** [March 26, 2010, 9:39pm UTC](https://www.ruby-forum.com/t/rake-argument-error/185834 "2010-03-26T21:39:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![raghu\_muni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/85f322/32.png) [@raghu\_muni](https://www.ruby-forum.com/u/raghu_muni)\
**Post date:** [March 26, 2010, 9:39pm UTC](https://www.ruby-forum.com/t/rake-argument-error/185834/1 "2010-03-26T21:39:40Z")

</div>

Hi,

I’m having a problem loading a sample data with simple rake command.  
rake db:fixtures:load

When I run the above command,I get the following error

$rake db:fixtures:load  
(in /home/raghu/www/photos)  
rake aborted!  
a YAML error occurred parsing  
/home/raghu/www/photos/test/fixtures/photos.yml. Please note that YAML  
must be consistently indented using spaces. Tabs are not allowed. Please  
have a look at [YAML Ain't Markup Language](http://www.yaml.org/faq.html)  
The exact error was:  
ArgumentError: syntax error on line 14, col 11: ` filename:  
train.jpg’

(See full trace by running task with --trace)

Here is the file that can be useful

# Read about fixtures at [http://ar.rubyonrails.org/classes/Fixtures.html](http://ar.rubyonrails.org/classes/Fixtures.html)

one:  
filename: MyString  
thumbnail: MyString  
description: MyString

two:  
filename: MyString  
thumbnail: MyString  
description: MyString

photo\_1:  
id:1  
filename: train.jpg  
thumbnail: train\_t.jpg  
description: My ride to work

photo\_2:  
id: 2  
filename: lighthouse.jpg  
thumbnail: lighthouse\_t.jpg  
description: I take dates here all the time

photo\_3:  
id: 3  
filename: gargoyle.jpg  
thumbnail: gargoyle\_t.jpg  
description: My paper weight

photo\_4:  
id: 4  
filename: cat.jpg  
thumbnail: cat\_t.jpg  
description: My pet  
photo\_5:  
id: 5  
filename: cappucino.jpg  
thumbnail: cappucino\_t.jpg  
description: Life Juice

photo\_6:  
id: 6  
filename: building.jpg  
thumbnail: building\_t.jpg  
description: My office  
photo\_7:  
id: 7  
filename: bridge.jpg  
thumbnail: bridge\_t.jpg  
description: Place I’d like to visit

Any idea of what might went wrong?

Raghu

---

<div class="post-metadata">

**Author:** ![raghu\_muni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/85f322/32.png) [@raghu\_muni](https://www.ruby-forum.com/u/raghu_muni)\
**Post date:** [March 26, 2010, 10:16pm UTC](https://www.ruby-forum.com/t/rake-argument-error/185834/2 "2010-03-26T22:16:15Z")

</div>

On 26 March 2010 20:39, Raghu M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> a YAML error occurred parsing
> 
> description: MyString
> 
> photo\_1:  
> id:1  
> filename: train.jpg

Have you double checked there are no tabs on the line above?  
Also try deleting it, retyping it, changing it to something that works  
then changing it back again etc etc  
Basically try things to get a handle on the problem.

Colin

---

<div class="post-metadata">

**Author:** ![raghu\_muni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/85f322/32.png) [@raghu\_muni](https://www.ruby-forum.com/u/raghu_muni)\
**Post date:** [March 26, 2010, 10:35pm UTC](https://www.ruby-forum.com/t/rake-argument-error/185834/3 "2010-03-26T22:35:34Z")

</div>

Hey,

The error is that there’s no space in “id:1” in the YAML.

/Lasse

2010/3/26 Colin L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![raghu\_muni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/85f322/32.png) [@raghu\_muni](https://www.ruby-forum.com/u/raghu_muni)\
**Post date:** [March 27, 2010, 5:39pm UTC](https://www.ruby-forum.com/t/rake-argument-error/185834/4 "2010-03-27T17:39:18Z")

</div>

Colin L. wrote:

> On 26 March 2010 20:39, Raghu M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > a YAML error occurred parsing
> > 
> > ï¿½description: MyString
> > 
> > photo\_1:  
> > ï¿½id:1  
> > ï¿½filename: train.jpg
> 
> Have you double checked there are no tabs on the line above?  
> Also try deleting it, retyping it, changing it to something that works  
> then changing it back again etc etc  
> Basically try things to get a handle on the problem.
> 
> Colin

Are you referring to the tab above photo\_1/description…If you are  
talking about tabs b/w filename: train.jpg,I’m sure that there are no  
tabs b/w them except a single character space.

Raghu

---

<div class="post-metadata">

**Author:** ![raghu\_muni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/85f322/32.png) [@raghu\_muni](https://www.ruby-forum.com/u/raghu_muni)\
**Post date:** [March 27, 2010, 5:40pm UTC](https://www.ruby-forum.com/t/rake-argument-error/185834/5 "2010-03-27T17:40:39Z")

</div>

Lasse B. wrote:

> Hey,
> 
> The error is that there’s no space in “id:1” in the YAML.
> 
> /Lasse
> 
> 2010/3/26 Colin L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

Hi Lasse,

I’ve even tried that but gives me same error.

Raghu

---

<div class="post-metadata">

**Author:** ![raghu\_muni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/85f322/32.png) [@raghu\_muni](https://www.ruby-forum.com/u/raghu_muni)\
**Post date:** [March 27, 2010, 7:06pm UTC](https://www.ruby-forum.com/t/rake-argument-error/185834/6 "2010-03-27T19:06:53Z")

</div>

I tried parsing the YAML as given by Raghu, and it worked after fixing  
the  
“id:1” \> “id: 1” error.

/Lasse

2010/3/27 Colin L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![raghu\_muni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/85f322/32.png) [@raghu\_muni](https://www.ruby-forum.com/u/raghu_muni)\
**Post date:** [March 27, 2010, 6:02pm UTC](https://www.ruby-forum.com/t/rake-argument-error/185834/7 "2010-03-27T18:02:30Z")

</div>

On 27 March 2010 16:39, Raghu M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Have you double checked there are no tabs on the line above?  
> > Also try deleting it, retyping it, changing it to something that works  
> > then changing it back again etc etc  
> > Basically try things to get a handle on the problem.
> > 
> > Colin
> 
> Are you referring to the tab above photo\_1/description…If you are  
> talking about tabs b/w filename: train.jpg,I’m sure that there are no  
> tabs b/w them except a single character space.

There should be no tab characters anywhere in yaml files. Lasse is  
right that there should be space after id: in the line above.  
So having fixed that what was the result of my other suggestions?  
Deleting that line, retyping it, pasting in a line that you know works  
and so on. If the line in that position keeps giving an error  
whatever you do then it is probably the line above, I assumed Lasse’s  
suggestion would fix it.

Colin
