开发者

Cucumber gives Sqlite3 error

开发者 https://www.devze.com 2023-01-30 04:44 出处:网络
I just started using Cucumber, but I am running into a weird error: SQLite3::SQLException: no such table: venues: SELECT \"venues\".* FROM \"venues\" (ActiveRecord::StatementInvalid)

I just started using Cucumber, but I am running into a weird error:

SQLite3::SQLException: no such table: venues: SELECT "venues".* FROM "venues" (ActiveRecord::StatementInvalid)
./app/controllers/venues_controller.rb:5:in `index'
<internal:prelude&开发者_C百科gt;:10:in `synchronize'
./features/step_definitions/web_steps.rb:18:in `/^(?:|I )am on (.+)$/'
features/most_popular_bands.feature:8:in `Given I am on the home page'

This comes from the Given step, where I mention the home page, which has a list of items from the venues tables. I wonder why Cucumber cannot find that table.

Btw, I am not running it with autotest. I am using bundle exec cucumber.


I got it working with rake cucumber.


It looks like you're executing your features on old version of the database. Try rake db:test:clone to copy the scheme of your development database to the test database.

0

精彩评论

暂无评论...
验证码 换一张
取 消