2012-08-22 10 views
5

रेक परीक्षण चलाते समय, मुझे कुछ त्रुटियां YAML फ़ाइल का संदर्भ देती हैं। यह कैसे तय करें पर कोई विचार है?रेक परीक्षण - वाईएएमएल त्रुटि बनाता है, मैं इसे कैसे ठीक करूं?

Running tests: EEEEEEEE

Finished tests in 0.070970s, 112.7237 tests/s, 0.0000 assertions/s.

1) Error: test_should_create_product(ProductsControllerTest): ActiveRecord::Fixture::FormatError: a YAML error occurred parsing /Users/ka/src/ruby-test/depot/test/fixtures/products.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Please have a look at yaml.org/faq.html The exact error was: Psych::SyntaxError:(): found character that cannot start any token while scanning for the next token at line 5 column 1 /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:43:in rows' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:29:ineach' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:670:in block (2 levels) in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:20:inopen' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:669:in block in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:668:in each' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:668:in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:548:in initialize' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:482:in new' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:482:in block (2 levels) in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:479:in map' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:479:in block in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:168:in disable_referential_integrity' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:476:in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:895:in load_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:849:in setup_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:429:in _run__2260432841310236767__setup__3358002533217195166__callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in __run_callback' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in _run_setup_callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in run_callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/testing/setup_and_teardown.rb:35:in `run'

2) Error: test_should_destroy_product(ProductsControllerTest): ActiveRecord::Fixture::FormatError: a YAML error occurred parsing /Users/ka/src/ruby-test/depot/test/fixtures/products.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Please have a look at ://www.yaml.org/faq.html The exact error was: Psych::SyntaxError:(): found character that cannot start any token while scanning for the next token at line 5 column 1 /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:43:in rows' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:29:ineach' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:670:in block (2 levels) in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:20:inopen' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:669:in block in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:668:in each' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:668:in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:548:in initialize' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:482:in new' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:482:in block (2 levels) in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:479:in map' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:479:in block in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:168:in disable_referential_integrity' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:476:in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:895:in load_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:849:in setup_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:429:in _run__2260432841310236767__setup__3358002533217195166__callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in __run_callback' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in _run_setup_callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in run_callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/testing/setup_and_teardown.rb:35:in `run'

3) Error: test_should_get_edit(ProductsControllerTest): ActiveRecord::Fixture::FormatError: a YAML error occurred parsing /Users/ka/src/ruby-test/depot/test/fixtures/products.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Please have a look at ://www.yaml.org/faq.html The exact error was: Psych::SyntaxError:(): found character that cannot start any token while scanning for the next token at line 5 column 1 /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:43:in rows' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:29:ineach' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:670:in block (2 levels) in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:20:inopen' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:669:in block in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:668:in each' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:668:in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:548:in initialize' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:482:in new' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:482:in block (2 levels) in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:479:in map' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:479:in block in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:168:in disable_referential_integrity' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:476:in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:895:in load_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:849:in setup_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:429:in _run__2260432841310236767__setup__3358002533217195166__callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in __run_callback' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in _run_setup_callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in run_callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/testing/setup_and_teardown.rb:35:in `run'

4) Error: test_should_get_index(ProductsControllerTest): ActiveRecord::Fixture::FormatError: a YAML error occurred parsing /Users/ka/src/ruby-test/depot/test/fixtures/products.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Please have a look at ://www.yaml.org/faq.html The exact error was: Psych::SyntaxError:(): found character that cannot start any token while scanning for the next token at line 5 column 1 /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:43:in rows' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:29:ineach' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:670:in block (2 levels) in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:20:inopen' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:669:in block in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:668:in each' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:668:in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:548:in initialize' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:482:in new' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:482:in block (2 levels) in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:479:in map' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:479:in block in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:168:in disable_referential_integrity' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:476:in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:895:in load_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:849:in setup_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:429:in _run__2260432841310236767__setup__3358002533217195166__callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in __run_callback' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in _run_setup_callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in run_callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/testing/setup_and_teardown.rb:35:in `run'

5) Error: test_should_get_new(ProductsControllerTest): ActiveRecord::Fixture::FormatError: a YAML error occurred parsing /Users/ka/src/ruby-test/depot/test/fixtures/products.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Please have a look at ://www.yaml.org/faq.html The exact error was: Psych::SyntaxError:(): found character that cannot start any token while scanning for the next token at line 5 column 1 /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:43:in rows' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:29:ineach' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:670:in block (2 levels) in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:20:inopen' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:669:in block in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:668:in each' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:668:in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:548:in initialize' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:482:in new' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:482:in block (2 levels) in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:479:in map' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:479:in block in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:168:in disable_referential_integrity' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:476:in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:895:in load_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:849:in setup_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:429:in _run__2260432841310236767__setup__3358002533217195166__callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in __run_callback' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in _run_setup_callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in run_callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/testing/setup_and_teardown.rb:35:in `run'

6) Error: test_should_show_product(ProductsControllerTest): ActiveRecord::Fixture::FormatError: a YAML error occurred parsing /Users/ka/src/ruby-test/depot/test/fixtures/products.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Please have a look at ://www.yaml.org/faq.html The exact error was: Psych::SyntaxError:(): found character that cannot start any token while scanning for the next token at line 5 column 1 /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:43:in rows' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:29:ineach' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:670:in block (2 levels) in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:20:inopen' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:669:in block in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:668:in each' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:668:in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:548:in initialize' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:482:in new' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:482:in block (2 levels) in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:479:in map' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:479:in block in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:168:in disable_referential_integrity' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:476:in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:895:in load_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:849:in setup_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:429:in _run__2260432841310236767__setup__3358002533217195166__callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in __run_callback' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in _run_setup_callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in run_callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/testing/setup_and_teardown.rb:35:in `run'

7) Error: test_should_update_product(ProductsControllerTest): ActiveRecord::Fixture::FormatError: a YAML error occurred parsing /Users/ka/src/ruby-test/depot/test/fixtures/products.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Please have a look at ://www.yaml.org/faq.html The exact error was: Psych::SyntaxError:(): found character that cannot start any token while scanning for the next token at line 5 column 1 /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:43:in rows' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:29:ineach' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:670:in block (2 levels) in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:20:inopen' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:669:in block in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:668:in each' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:668:in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:548:in initialize' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:482:in new' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:482:in block (2 levels) in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:479:in map' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:479:in block in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:168:in disable_referential_integrity' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:476:in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:895:in load_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:849:in setup_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:429:in _run__2260432841310236767__setup__3358002533217195166__callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in __run_callback' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in _run_setup_callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in run_callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/testing/setup_and_teardown.rb:35:in `run'

8) Error: test_should_get_index(StoreControllerTest): ActiveRecord::Fixture::FormatError: a YAML error occurred parsing /Users/ka/src/ruby-test/depot/test/fixtures/products.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Please have a look at ://www.yaml.org/faq.html The exact error was: Psych::SyntaxError:(): found character that cannot start any token while scanning for the next token at line 5 column 1 /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:43:in rows' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:29:ineach' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:670:in block (2 levels) in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:20:inopen' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:669:in block in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:668:in each' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:668:in read_fixture_files' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:548:in initialize' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:482:in new' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:482:in block (2 levels) in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:479:in map' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:479:in block in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:168:in disable_referential_integrity' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:476:in create_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:895:in load_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures.rb:849:in setup_fixtures' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:429:in _run__3541484041722071485__setup__3358002533217195166__callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in __run_callback' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in _run_setup_callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in run_callbacks' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/testing/setup_and_teardown.rb:35:in `run'

8 tests, 0 assertions, 0 failures, 8 errors, 0 skips Errors running test:units! # Errors running test:functionals! #

+1

क्या '/ उपयोगकर्ताओं/ka/src/गहरे लाल रंग का परीक्षण/डिपो/परीक्षण/फिक्स्चर/products.yml' कैसा दिखता है? क्या इसमें रिक्त स्थान के बजाय टैब शामिल हैं? – Qsario

+0

यह त्रुटि बहुत सरल लगती है: "कृपया ध्यान दें कि वाईएएमएल को रिक्त स्थान का उपयोग करके लगातार इंडेंट किया जाना चाहिए। टैब की अनुमति नहीं है।" 'products.yml' फ़ाइल में शायद कुछ टैब हैं। –

+0

धन्यवाद, यह कुछ टैब था जो इसे किया .. – OnkelK

उत्तर

16

अपने products.yml फ़ाइल को खोलने और उस को देखने में कोई अतिरिक्त स्थान से पहले और शब्द के बाद है वहाँ सब एक के रूप में एक पंक्ति में कर रहे हैं:

title: MyString 
description: MyText 
image_url: MyString 
price: 9.99 

तो यह त्रुटि देता है "शीर्षक से पहले कोई जगह नहीं" , यह होना चाहिए एक:

title: MyString 
description: MyText 
image_url: MyString 
price: 9.99 
+0

यह भी सुनिश्चित करें कि आप अपनी वाईएमएल फ़ाइल में टैब के बजाय रिक्त स्थान का उपयोग कर रहे हैं। इस तरह के लिटर के साथ अपने वाईएमएल को मान्य करें: http://www.yamllint.com/ –

संबंधित मुद्दे