Перенос коммерческой коммерции из heroku в цифровой океан с помощью dokku

Я пытался перенести свое торговое приложение с героку на цифровой океан. поэтому я решил использовать dokku. Пока все шло хорошо, пока я не попытался перенести базу данных. Кажется, отсутствует миграция ... хотя я не понимаю: почему она работает на моей локальной машине и в двух разных приложениях heroku (постановочная и производственная), и почему в dokku возникает ошибка?

Это ошибка из логов dokku.

ActiveRecord::SchemaMigration Load (1.4ms)  SELECT "schema_migrations".* FROM "schema_migrations"
Migrating to AddTranslationsToStore (20150602075811)
   (0.4ms)  BEGIN
== 20150602075811 AddTranslationsToStore: migrating ===========================
-- table_exists?(:spree_store_translations)
   -> 0.0011s
   (0.7ms)  ROLLBACK
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

undefined method `create_translation_table!' for #<Class:0x007f17eb26e620>/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/dynamic_matchers.rb:26:in `method_missing'
/app/db/migrate/20150602075811_add_translations_to_store.spree_i18n.rb:6:in `up'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:609:in `exec_migration'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:590:in `block (2 levels) in migrate'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:589:in `block in migrate'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:588:in `migrate'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:765:in `migrate'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:995:in `block in execute_migration_in_transaction'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:1041:in `block in ddl_transaction'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/transaction.rb:188:in `within_new_transaction'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/transactions.rb:220:in `transaction'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:1041:in `ddl_transaction'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:994:in `execute_migration_in_transaction'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:956:in `block in migrate'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:952:in `each'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:952:in `migrate'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:820:in `up'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:798:in `migrate'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
NoMethodError: undefined method `create_translation_table!' for #<Class:0x007f17eb26e620>
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/dynamic_matchers.rb:26:in `method_missing'
/app/db/migrate/20150602075811_add_translations_to_store.spree_i18n.rb:6:in `up'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:609:in `exec_migration'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:590:in `block (2 levels) in migrate'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:589:in `block in migrate'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:588:in `migrate'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:765:in `migrate'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:995:in `block in execute_migration_in_transaction'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:1041:in `block in ddl_transaction'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/transaction.rb:188:in `within_new_transaction'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/transactions.rb:220:in `transaction'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:1041:in `ddl_transaction'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:994:in `execute_migration_in_transaction'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:956:in `block in migrate'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:952:in `each'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:952:in `migrate'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:820:in `up'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/migration.rb:798:in `migrate'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.2/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'

person user2030592    schedule 18.09.2015    source источник
comment
Эта ошибка возникла из-за gem globalize миграция Вы выполнили все требования по установке?   -  person cnnr    schedule 18.09.2015
comment
Перечислен ли гем globalize в вашем gemspec/Gemfile?   -  person Felix    schedule 21.09.2015
comment
GIT remote: git://github.com/spree-contrib/spree_i18n.git ревизия: a9b909a734cba71187585e95c12dce791541a16f ветка: 3-0-стабильные спецификации: spree_i18n (3.0.0) friendly_id-globalize globalize (~› 5.0.1) i18n_data (~ › 0.7.0) kaminari-i18n (~› 0.3.2) rails-i18n (~› 4.0.1) spree_core (~› 3.0.4)   -  person user2030592    schedule 21.09.2015


Ответы (1)


Чтобы это исправить, вам нужно включить гем spree_globalize, в прошлом он был частью spree_I18n:

gem 'spree_globalize', github: 'spree-contrib/spree_globalize', branch: 'master'

Это решит проблему миграции

person Carlos Castillo    schedule 05.01.2017