# Cant get fixtures to load

**URL:** <https://www.ruby-forum.com/t/cant-get-fixtures-to-load/88456>\
**Category:** Rails\
**Created:** [March 11, 2007, 1:28pm UTC](https://www.ruby-forum.com/t/cant-get-fixtures-to-load/88456 "2007-03-11T13:28:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KSRajesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/c77e96/32.png) [@KSRajesh](https://www.ruby-forum.com/u/KSRajesh)\
**Post date:** [March 11, 2007, 1:28pm UTC](https://www.ruby-forum.com/t/cant-get-fixtures-to-load/88456/1 "2007-03-11T13:28:37Z")

</div>

Hi,

I cant get yaml fixtures to load. The brief error is

Errno::ENOENT: No such file or directory - some.

I have NO idea what this ‘some’ is.

The yaml file is simplicity itself.

hq:  
id: 1  
role\_name: HeadQuarters

I have tried this with  
a) One space after the colon following id and role\_name  
b) Indented perfectly according to JEdit.

Both give the same error. Any thoughts?

Regards,  
Rajesh

The complete error message is below.

Fixture::FormatError: a YAML error occured parsing F:/railswork/kbase/  
config/…/  
test/fixtures/roles.yml. Please note that YAML must be consistently  
indented usi  
ng spaces. Tabs are not allowed. Please have a look at  
[http://www.yaml.org/faq.h](http://www.yaml.org/faq.h)  
tml  
The exact error was:  
Errno::ENOENT: No such file or directory - some  
e:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/  
active\_record/fixture  
s.rb:311:in `read_fixture_files' e:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/ active_record/fixture s.rb:279:in `initialize’  
e:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/  
active\_record/fixture  
s.rb:251:in `new' e:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/ active_record/fixture s.rb:251:in `create\_fixtures’  
e:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/  
active\_record/fixture  
s.rb:250:in `map' e:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/ active_record/fixture s.rb:250:in `create\_fixtures’  
e:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/  
active\_record/base.rb  
:794:in `silence' e:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/ active_record/fixture s.rb:248:in `create\_fixtures’  
e:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/  
active\_record/fixture  
s.rb:565:in `load_fixtures' e:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/ active_record/fixture s.rb:512:in `setup’

1. Error:  
test\_unique\_role(RoleTest):  
NoMethodError: You have a nil object when you didn’t expect it!  
You might have expected an instance of Array.  
The error occured while evaluating nil.-  
e:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/  
active\_record/transac  
tions.rb:112:in `unlock_mutex' e:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/ active_record/fixture s.rb:534:in `teardown’

1 tests, 0 assertions, 0 failures, 2 errors

---

<div class="post-metadata">

**Author:** ![KSRajesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/c77e96/32.png) [@KSRajesh](https://www.ruby-forum.com/u/KSRajesh)\
**Post date:** [March 11, 2007, 2:41pm UTC](https://www.ruby-forum.com/t/cant-get-fixtures-to-load/88456/2 "2007-03-11T14:41:45Z")

</div>

$ irb -r yaml  
irb(main):001:0\> YAML.load(“hq:\n id: 1\n role\_name: HeadQuarters”)  
=\> {“hq”=\>{“id”=\>1, “role\_name”=\>“HeadQuarters”}}  
irb(main):002:0\> YAML.load(“hq:\n\tid: 1\n\trole\_name: HeadQuarters”)  
ArgumentError: syntax error on line 1, col 4: `id: 1' from /usr/lib/ruby/1.8/yaml.rb:133:in`load’  
from /usr/lib/ruby/1.8/yaml.rb:133:in `load’  
from (irb):2

> >

Make sure JEdit isn’t including tabs BEFORE id: and role\_name:

---

<div class="post-metadata">

**Author:** ![KSRajesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/c77e96/32.png) [@KSRajesh](https://www.ruby-forum.com/u/KSRajesh)\
**Post date:** [March 11, 2007, 6:10pm UTC](https://www.ruby-forum.com/t/cant-get-fixtures-to-load/88456/3 "2007-03-11T18:10:22Z")

</div>

I am quite sure there are no tabs before the id and the role\_name. I  
transferred it into Editplus and checked too. No question about  
that…

Rajesh
