开发者

Heroku "Globalize3" migration fails

I'm deployinh a ruby on rails app on heroku. On localhost everything went well, but when running

heroku rake db:migrate

to run the migration on heroku my migration fails with this error:

rake aborted! An error has occurred, this and all later migrations canceled:

PGError: ERROR: current transaction is aborted, commands ignored until end of transaction block : CREATE TABLE "product_translations" ("id" serial primary key, "product_id" integer, "locale" character varying(255), "description" text, "created_at" timestamp, "updated_at" timestamp)

(See full trace by running task with --tra开发者_JAVA百科ce)

My migration is built as follows:

class CreateProducts < ActiveRecord::Migration
  def self.up
    create_table :products do |t|
      t.string :image_path
      t.text :description
      t.timestamps
    end
    Product.create_translation_table! :description => :text
  end

  def self.down
    drop_table :products
    Product.drop_translation_table!
  end
end

It seems the query used to create the table for globalize3 (the Product.create_translation_table! method) fails.

Any ideas?

Thanks in advance


They are saying that it is because of a gem error.

gem 'globalize3', :path => 'vendor/plugins/globalize3'
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜