我在heroku上部署了一个红宝石rails应用程序。在本地主机上一切都进行得很顺利,但是当运行的时候
heroku rake db:迁移
为了在heroku上运行迁移,我的迁移失败了,出现了以下错误:
拉克流产了!发生了一个错误,此迁移和以后的所有迁移都被取消: PGError:错误:当前事务被中止,命令被忽略直到事务块结束:创建表"product_translations“("id”系列主键、"product_id“整数、"locale”字符变化(255)、"description“文本、"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!方法)失败。
有什么想法吗?
提前感谢
发布于 2011-07-13 21:28:00
他们说这是因为创业板错误。
gem 'globalize3', :path => 'vendor/plugins/globalize3'https://stackoverflow.com/questions/5028896
复制相似问题