Hey,

The error is that there's no space in "id:1" in the YAML.

/Lasse

2010/3/26 Colin Law <[email protected]>

> On 26 March 2010 20:39, Raghu Maddali <[email protected]> wrote:
> > 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 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
> >
> > one:
> >  filename: MyString
> >  thumbnail: MyString
> >  description: MyString
> >
> > two:
> >  filename: MyString
> >  thumbnail: MyString
> >  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
>
> >  thumbnail: train_t.jpg
> >  description: My ride to work
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<rubyonrails-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to