Search code examples
ruby-on-railspostgresqlcucumberdelayed-job

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


Solution

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