Advertisement
Guest User

Untitled

a guest
Aug 1st, 2017
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.17 KB | None | 0 0
  1. ## database.yaml
  2. development:
  3. adapter: sqlite3
  4. database: db/development.db
  5.  
  6. # Warning: The database defined as 'test' will be erased and
  7. # re-generated from your development database when you run 'rake'.
  8. # Do not set this db to the same as development or production.
  9. test:
  10. adapter: sqlite3
  11. database: db/test.db
  12. #verbosity: silent
  13.  
  14. production:
  15. adapter: postgresql
  16. database: wimm_production
  17. username: wimm
  18. password: wimm
  19. host: localhost
  20.  
  21. ## migration
  22. class CreateExpenses < ActiveRecord::Migration
  23. def self.up
  24. create_table :expenses do |t|
  25. t.column :created_at, :datetime
  26. t.column :updated_at, :datetime
  27. t.column :spent_at, :date
  28. t.column :spent_on, :string
  29. t.column :amount, :integer
  30. end
  31. end
  32.  
  33. def self.down
  34. drop_table :expenses
  35. end
  36. end
  37.  
  38. ## rake output
  39. c:\dev\tools\ruby\bin\ruby -I.;lib;test -rtest/unit -e "%w[test/functional/expenses_controller_test.rb test/unit/expense_test.rb].each { |f| require f }" | unit_diff -u
  40. Loaded suite -e
  41. Started
  42. EEEEEEEE
  43. Finished in 0.24 seconds.
  44.  
  45. 1) Error:
  46. test_truth(ExpenseTest):
  47. ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: expenses: DELETE FROM expenses WHERE 1=1
  48. C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:128:in `log'
  49. C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:154:in `execute'
  50. C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:361:in `catch_schema_changes'
  51. C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:154:in `execute'
  52. C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:164:in `delete'
  53. C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/fixtures.rb:285:in `delete_existing_fixtures'
  54. C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/fixtures.rb:256:in `create_fixtures'
  55. C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/fixtures.rb:256:in `create_fixtures'
  56. C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:59:in `transaction'
  57. C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/fixtures.rb:255:in `create_fixtures'
  58. C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/base.rb:890:in `silence'
  59. C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/fixtures.rb:248:in `create_fixtures'
  60. C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/fixtures.rb:581:in `load_fixtures'
  61. C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/fixtures.rb:535:in `setup'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement