zoukankan      html  css  js  c++  java
  • rspec Could not find table

    如果运行rspec的时候出现了Could not find table,你需要rake db:test:prepare.

    如果你的数据库用的是sqlite3,测试的时候用的数据库并不是development.sqlite3,而是test.sqlite3,看其执行过程:

    rake db:test:prepare --trace
    ** Invoke db:test:prepare (first_time)
    ** Invoke db:abort_if_pending_migrations (first_time)
    ** Invoke environment (first_time)
    ** Execute environment
    ** Invoke db:load_config (first_time)
    ** Execute db:load_config
    ** Execute db:abort_if_pending_migrations
    ** Execute db:test:prepare
    ** Invoke db:test:load (first_time)
    ** Invoke db:test:purge (first_time)
    ** Invoke environment
    ** Invoke db:load_config
    ** Execute db:test:purge
    ** Execute db:test:load
    ** Invoke db:test:load_schema (first_time)
    ** Invoke db:test:purge
    ** Execute db:test:load_schema
    ** Invoke db:schema:load (first_time)
    ** Invoke environment
    ** Invoke db:load_config
    ** Execute db:schema:load

  • 相关阅读:
    势函数的构造
    10.29模拟赛总结
    10.29vp总结
    10.25模拟赛总结
    10.24模拟赛总结
    线段树练习
    一键挖矿
    P1972 [SDOI2009]HH的项链
    P3901 数列找不同
    P5546 [POI2000]公共串
  • 原文地址:https://www.cnblogs.com/angestudy/p/2754360.html
Copyright © 2011-2022 走看看