黄瓜给出 Sqlite3 错误

发布于 2024-10-07 03:47:12 字数 563 浏览 0 评论 0原文

我刚刚开始使用 Cucumber,但遇到了一个奇怪的错误:

SQLite3::SQLException: no such table: venues: SELECT "venues".* FROM "venues" (ActiveRecord::StatementInvalid)
./app/controllers/venues_controller.rb:5:in `index'
<internal:prelude>: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'

这来自 Given 步骤,其中我提到了主页,其中包含场地表中的项目列表。我想知道为什么 Cucumber 找不到那张桌子。

顺便说一句,我没有通过自动测试来运行它。我正在使用bundle exec cucumber

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>: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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

蓝颜夕 2024-10-14 03:47:12

我让它与rake cucumber一起工作。

I got it working with rake cucumber.

不必了 2024-10-14 03:47:12

看起来您正在旧版本的数据库上执行您的功能。尝试使用 rake db:test:clone 将开发数据库的方案复制到测试数据库。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文