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

  • 相关阅读:
    linux运维、架构之路-MySQL主从复制
    多线程
    IO
    查看信息
    乱码
    字节流与字符流
    file
    JDBC
    规范
    Java常用包
  • 原文地址:https://www.cnblogs.com/angestudy/p/2754360.html
Copyright © 2011-2022 走看看