开发者

relation "delayed_jobs" does not exist in Rails 3.0.3 cucumber tests

I am running a Rails 3.0.3 with Postgres 9.0.1 and delayed_job 2.1.1. I configured delayed_job for Solr reindexing on an after_save callback which works great in development. When running cucumber tests for the model in question's create method, I get:

(::) failed steps (开发者_开发问答::)

PGError: ERROR: relation "delayed_jobs" does not exist LINE 4: WHERE a.attrelid = '"delayed_jobs"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"delayed_jobs"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum (ActiveRecord::StatementInvalid) ./app/controllers/admin/items_controller.rb:11:in create' ./features/step_definitions/web_steps.rb:29 ./features/step_definitions/web_steps.rb:14:inwith_scope' ./features/step_definitions/web_steps.rb:28:in /^(?:|I )press "([^"]*)"(?: within "([^"]*)")?$/' features/admin/item_create.feature:20:inAnd I press "Create"'

Any ideas? Thanks


i.e. you should run rake db:test:clone


Probably you haven't run migrations on the test database.


please use

rake db:migrate:up VERSION=20080906120000 RAILS_ENV=test
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜