【问题标题】:Heroku "Globalize3" migration failsHeroku“Globalize3”迁移失败
【发布时间】:2011-06-29 01:42:57
【问题描述】:

我正在 heroku 上部署一个 ruby​​ on rails 应用程序。在本地主机上一切顺利,但是在运行时

heroku rake db:迁移

要在 heroku 上运行迁移,我的迁移失败并出现以下错误:

rake 中止!发生了错误, 这个和所有后来的迁移 取消:

PGError: 错误: 当前交易 被中止,命令被忽略直到结束 事务块:CREATE TABLE "product_translations" ("id" 序列号 主键,“product_id”整数, “语言环境”字符变化(255), “描述”文本,“created_at” 时间戳,“updated_at”时间戳)

(通过运行任务查看完整跟踪 --trace)

我的迁移构建如下:

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

用于为 globalize3 创建表的查询(Product.create_translation_table!方法)似乎失败了。

有什么想法吗?

提前致谢

【问题讨论】:

    标签: ruby-on-rails ruby migration heroku


    【解决方案1】:

    They 说这是因为 gem 错误。

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

    【讨论】:

      猜你喜欢
      • 2015-01-13
      • 1970-01-01
      • 2011-08-05
      • 1970-01-01
      • 2015-06-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多