添加 refinerycms 后迁移数据库时出现问题 gem

Issue in migrating database after adding refinerycms gem

我正在将 refinerycms 集成到现有应用程序中,并遵循 http://www.refinerycms.com/guides/with-an-existing-rails-app

中提到的步骤

我的 gemfile 包含以下内容:

gem 'refinerycms', github: 'refinery/refinerycms', branch: 'master'
gem 'refinerycms-i18n', github: 'refinery/refinerycms-i18n', branch: 'master'

将 gem 'refinerycms'、'~> 3.0.0' 添加到 gem 文件也会产生相同的错误:

Error==> Mysql2::Error: Table 'refinery_base_model_translations' already exists: CREATE TABLE refinery_base_model_translations (id int(11) auto_increment PRIMARY KEY, refinery_base_model_id int(11) NOT NULL, locale varchar(255) NOT NULL, created_at datetime NOT NULL, updated_at datetime NOT NULL) ENGINE=InnoDB**

@Shefalee Chaudhary 在迁移中注释掉这些行将解决您的问题:

 #::Refinery::PagePart.create_translation_table!({
 #  :body => :text
 #})

#::Refinery::Page.create_translation_table!({
  #  :title => :string,
  #  :custom_slug => :string,
  #  :menu_title => :string,
  #  :slug => :string
 # })