starting rails in test environment

前端 未结 3 800
野性不改
野性不改 2021-02-06 02:47

I\'m trying to load up rails in the test environment using a ruby script. I\'ve tried googling a bit and found this recommendation:

require \"../../config/enviro         


        
3条回答
  •  没有蜡笔的小新
    2021-02-06 03:31

    to start test environment you should run script/server with -e param:

    ruby script/server -e test
    

    and in your config/database.yml must be defenition of test env database, i.e.:

    test:
      adapter: sqlite3
      database: db/test.sqlite3
      pool: 5
      timeout: 5000
    

提交回复
热议问题