SitePoint Sponsor

User Tag List

Results 1 to 10 of 10

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Aug 2009
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SIMPLY RAILS 2 BY PATRICK LENZ tutorial not worlking

    Good day to all gurus,
    ive been following this tutorial. SIMPLY
    RAILS 2
    BY PATRICK LENZ

    im already on the part for testing chapter 6 which is testing the form
    Im using instant rails 2 with sqlite
    but everytime i run $ rake test:units 6 errors I did follow what the tutorial step by step is this error is from my instant rails configuration I hope Mrlenz can help me on this Thanks again gurus

    am Files\Common Files\Roxio Shared\10.0\DLLShared\;C:\Documents and Settings\lui
    s.tejido\My Documents\Nmap;C:\Documents and Settings\luis.tejido\My Documents\CS
    O\Nmap;C:\Nmap;F:\Documents\exe\Nmap;C:\INSTAN~1.0-W\ruby\bin;C:\INSTAN~1.0-W\Ap
    ache;C:\INSTAN~1.0-W\PHP

    C:\InstantRails-2.0-win>cd rails_apps

    C:\InstantRails-2.0-win\rails_apps>dir
    Volume in drive C is System
    Volume Serial Number is C804-A688

    Directory of C:\InstantRails-2.0-win\rails_apps

    22/03/2010 15:45 <DIR> .
    22/03/2010 15:45 <DIR> ..
    21/03/2010 17:15 <DIR> .metadata
    21/03/2010 17:15 <DIR> cookbook
    22/03/2010 15:45 <DIR> shovell
    21/03/2010 17:15 <DIR> typo-2.6.0
    0 File(s) 0 bytes
    6 Dir(s) 57,730,093,056 bytes free

    C:\InstantRails-2.0-win\rails_apps>cd shovell

    C:\InstantRails-2.0-win\rails_apps\shovell>rake test:units
    (in C:/InstantRails-2.0-win/rails_apps/shovell)
    C:/InstantRails-2.0-win/ruby/bin/ruby -Ilib;test "C:/InstantRails-2.0-win/ruby/l
    ib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake/rake_test_loader.rb" "test/unit/story_
    test.rb"
    Loaded suite C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/
    rake/rake_test_loader
    Started
    EEEEEE
    Finished in 0.265 seconds.

    1) Error:
    test_should_be_valid_without_link(StoryTest):
    Errno::ENOENT: No such file or directory - SitePoint Forums
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:814:in `readlines'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:814:in `read_fixture_file'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:768:in `initialize'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:712:in `new'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:712:in `read_yaml_fixture_files'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:707:in `each'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:707:in `read_yaml_fixture_files'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:706:in `each'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:706:in `read_yaml_fixture_files'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:676:in `read_fixture_files'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:549:in `initialize'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:509:in `new'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:509:in `create_fixtures'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:508:in `map'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:508:in `create_fixtures'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/connection_adapters/abstract_adapter.rb:77:in `disable_referential_
    integrity'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:505:in `create_fixtures'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/base.rb:1198:in `silence'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:504:in `create_fixtures'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:1000:in `load_fixtures'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:934:in `setup'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
    active_support/testing/default.rb:7:in `run'

    2) Error:
    test_should_be_valid_without_link(StoryTest):
    SQLite3::SQLException: SQL logic error or missing database
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/errors.rb:94:in `check'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/resultset.rb:76:in `check'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/resultset.rb:68:in `commence'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/resultset.rb:61:in `initialize'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/statement.rb:163:in `new'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/statement.rb:163:in `execute'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/database.rb:212:in `execute'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/database.rb:187:in `prepare'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/database.rb:211:in `execute'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/database.rb:621:in `rollback'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/connection_adapters/sqlite_adapter.rb:164:in `rollback_db_transacti
    on'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/connection_adapters/sqlite_adapter.rb:345:in `catch_schema_changes'

    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/connection_adapters/sqlite_adapter.rb:164:in `rollback_db_transacti
    on'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:962:in `teardown'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
    active_support/testing/default.rb:7:in `run'

    3) Error:
    test_should_create_story(StoryTest):
    Errno::ENOENT: No such file or directory - SitePoint Forums
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:814:in `readlines'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:814:in `read_fixture_file'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:768:in `initialize'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:712:in `new'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:712:in `read_yaml_fixture_files'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:707:in `each'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:707:in `read_yaml_fixture_files'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:706:in `each'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:706:in `read_yaml_fixture_files'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:676:in `read_fixture_files'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:549:in `initialize'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:509:in `new'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:509:in `create_fixtures'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:508:in `map'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:508:in `create_fixtures'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/connection_adapters/abstract_adapter.rb:77:in `disable_referential_
    integrity'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:505:in `create_fixtures'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/base.rb:1198:in `silence'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:504:in `create_fixtures'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:1000:in `load_fixtures'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:934:in `setup'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
    active_support/testing/default.rb:7:in `run'

    4) Error:
    test_should_create_story(StoryTest):
    SQLite3::SQLException: SQL logic error or missing database
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/errors.rb:94:in `check'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/resultset.rb:76:in `check'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/resultset.rb:68:in `commence'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/resultset.rb:61:in `initialize'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/statement.rb:163:in `new'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/statement.rb:163:in `execute'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/database.rb:212:in `execute'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/database.rb:187:in `prepare'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/database.rb:211:in `execute'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/database.rb:621:in `rollback'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/connection_adapters/sqlite_adapter.rb:164:in `rollback_db_transacti
    on'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/connection_adapters/sqlite_adapter.rb:345:in `catch_schema_changes'

    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/connection_adapters/sqlite_adapter.rb:164:in `rollback_db_transacti
    on'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:962:in `teardown'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
    active_support/testing/default.rb:7:in `run'

    5) Error:
    test_should_not_be_valid_without_name(StoryTest):
    Errno::ENOENT: No such file or directory - SitePoint Forums
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:814:in `readlines'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:814:in `read_fixture_file'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:768:in `initialize'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:712:in `new'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:712:in `read_yaml_fixture_files'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:707:in `each'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:707:in `read_yaml_fixture_files'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:706:in `each'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:706:in `read_yaml_fixture_files'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:676:in `read_fixture_files'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:549:in `initialize'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:509:in `new'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:509:in `create_fixtures'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:508:in `map'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:508:in `create_fixtures'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/connection_adapters/abstract_adapter.rb:77:in `disable_referential_
    integrity'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:505:in `create_fixtures'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/base.rb:1198:in `silence'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:504:in `create_fixtures'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:1000:in `load_fixtures'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:934:in `setup'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
    active_support/testing/default.rb:7:in `run'

    6) Error:
    test_should_not_be_valid_without_name(StoryTest):
    SQLite3::SQLException: SQL logic error or missing database
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/errors.rb:94:in `check'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/resultset.rb:76:in `check'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/resultset.rb:68:in `commence'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/resultset.rb:61:in `initialize'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/statement.rb:163:in `new'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/statement.rb:163:in `execute'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/database.rb:212:in `execute'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/database.rb:187:in `prepare'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/database.rb:211:in `execute'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-m
    swin32/lib/sqlite3/database.rb:621:in `rollback'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/connection_adapters/sqlite_adapter.rb:164:in `rollback_db_transacti
    on'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/connection_adapters/sqlite_adapter.rb:345:in `catch_schema_changes'

    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/connection_adapters/sqlite_adapter.rb:164:in `rollback_db_transacti
    on'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/a
    ctive_record/fixtures.rb:962:in `teardown'
    C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
    active_support/testing/default.rb:7:in `run'

    3 tests, 0 assertions, 0 failures, 6 errors
    rake aborted!
    Command failed with status (1): [C:/InstantRails-2.0-win/ruby/bin/ruby -Ili...]

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

    C:\InstantRails-2.0-win\rails_apps\shovell>




  2. #2
    SitePoint Wizard jax502's Avatar
    Join Date
    Jul 2003
    Location
    Jacksonville, FL
    Posts
    1,031
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What page is this from? Make sure you check the errata page also, you might find some answers there:

    http://www.sitepoint.com/books/rails2/errata.php
    jax502

  3. #3
    SitePoint Member
    Join Date
    Aug 2009
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    tnx jax for the reply I did check http://www.sitepoint.com/books/rails2/errata.php but nothing there that helped solve. its page 179 to 183 for chapter 6

    tnx so much again!

  4. #4
    SitePoint Enthusiast
    Join Date
    Jan 2010
    Location
    Cleveland, OH
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you show me the code in your config/database.yml file and also your test/fixtures/(all files in this directory)?

  5. #5
    SitePoint Member
    Join Date
    Apr 2010
    Location
    Toronto, Canada
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,

    I am having similar problems while doing 'unit testing (page 184). I get the following error:

    (in C:/InstantRails/rails_apps/shovell)
    C:/InstantRails/ruby/bin/ruby.exe -I"lib;test" "C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/helpers/stories_helper_test.rb" "test/unit/story_test.rb"
    C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1959:in `method_missing': undefined method `validates_present_of' for #<Class:0x57830ac> (NoMethodError)
    from C:/InstantRails/rails_apps/shovell/app/models/story.rb:2
    from C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require'
    from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:265:in `require_or_load'
    from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:224:in `depend_on'
    from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:136:in `require_dependency'
    from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:414:in `load_application_classes'
    ... 12 levels...
    from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `load'
    from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
    from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `each'
    from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
    rake aborted!
    Command failed with status (1): [C:/InstantRails/ruby/bin/ruby.exe -I"lib;t...]

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

    Any ideas?
    - Ram

  6. #6
    SitePoint Enthusiast
    Join Date
    Jan 2010
    Location
    Cleveland, OH
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It looks like you have a typo. Your validation call should read validates_presence_of. I think you have it validates_present_of

  7. #7
    SitePoint Member
    Join Date
    Apr 2010
    Location
    Toronto, Canada
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeap,

    My story.rb was incorrect, should be 'presence'.

    I corrected that, however, get the remaining errors, could this be because I am using a new version of the gems?

    Thanks,
    Ram

  8. #8
    SitePoint Enthusiast
    Join Date
    Jan 2010
    Location
    Cleveland, OH
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can you show me the code in your story model and the stories tests?

  9. #9
    SitePoint Member
    Join Date
    Apr 2010
    Location
    Toronto, Canada
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    story.rb

    class Story < ActiveRecord::Base
    validates_presence_of :name, :link
    has_many :votes

    def to_param
    "#{id}-#{name.gsub(/\W/, '-').downcase}"
    end

    end

    story_test.rb

    require File.dirname(__FILE__) + '/../test_helper'

    class StoryTest < ActiveSupport::TestCase

    def test_should_not_be_valid_without_name
    s = Story.create(:name => nil, :link => 'http://www.testsubmission.com/')
    assert s.errors.on(:name)
    end

    def test_should_not_be_valid_without_link
    s = Story.create(:name => 'My test submission', :link => nil)
    assert s.errors.on(:link)
    end

    def test_should_create_story
    s = Story.create(
    :name => 'My test submission',
    :link => 'http://www.testsubmission.com/')
    assert s.valid?
    end

    end

    stories_controller_test

    require 'test_helper'

    class StoriesControllerTest < ActionController::TestCase
    # Replace this with your real tests.
    def test_should_show_index
    get: index
    assert_response: success
    assert_template: 'index'
    assert_not_nil assigns(:story)
    end
    end

    stories_helper_test.rb

    require 'test_helper'

    class StoriesHelperTest < ActionView::TestCase
    end

    -----

    I appreciate your guidance.
    - Ram

  10. #10
    SitePoint Enthusiast
    Join Date
    Jan 2010
    Location
    Cleveland, OH
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    From the error messages it looks like you are missing a library or gem. You can try updating all your gems by calling "gem update" on the command line.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •