Delayed_job在生产中不起作用PG :: UndefinedTable:错误:关系“delayed_jobs”不存在

时间:2014-10-16 17:01:36

标签: ruby-on-rails postgresql ruby-on-rails-4 delayed-job

我在我的开发设置上运行了delayed_job并运行正常,当我推送到临时/生产服务器时,只要将作业添加到队列中,我就会收到以下错误;

/home/deploy/staging/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:822:in `async_exec': PG::UndefinedTable: ERROR:  relation "delayed_jobs" does not exist (ActiveRecord::StatementInvalid)
LINE 5:                WHERE a.attrelid = '"delayed_jobs"'::regclass
                                          ^
:               SELECT a.attname, format_type(a.atttypid, a.atttypmod),
                     pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
                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

这与添加的工作无关,但一切都在开发中按预期工作。

该表已迁移并存在于登台服务器上;

== 20141009165225 CreateDelayedJobs:迁移================================ - create_table(:delayed_jobs,{:force => true})     - > 0.0158s - add_index(:delayed_jobs,[:priority,:run_at],{:name =>" delayed_jobs_priority"})     - > 0.0070s == 20141009165225 CreateDelayedJobs:已迁移(0.0236s)=======================

我已经删除并重新创建了数据库,但不知道如何解决这个问题......

0 个答案:

没有答案