Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/66.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails rails 4在gem rake db:migrate error上充当标记_Ruby On Rails_Ruby_Tags - Fatal编程技术网

Ruby on rails rails 4在gem rake db:migrate error上充当标记

Ruby on rails rails 4在gem rake db:migrate error上充当标记,ruby-on-rails,ruby,tags,Ruby On Rails,Ruby,Tags,我们在gem中不断遇到一个构建错误,这个错误被证明是相当难以捉摸的: == 20140517050649 ActsAsTaggableOnMigration: migrating ======================== -- create_table(:tags) -> 0.0057s -- create_table(:taggings) rake aborted! StandardError: An error has occurred, this and all lat

我们在gem中不断遇到一个构建错误,这个错误被证明是相当难以捉摸的:

== 20140517050649 ActsAsTaggableOnMigration: migrating ========================
-- create_table(:tags)
   -> 0.0057s
-- create_table(:taggings)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::DuplicateTable: ERROR:  relation "taggings" already exists
: CREATE TABLE "taggings" ("id" serial primary key, "tag_id" integer, "taggable_id" integer, "taggable_type" character varying(255), "tagger_id" integer, "tagger_type" character varying(255), "context" character varying(128), "created_at" timestamp) /home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `async_exec'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `block in execute'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:373:in `block in log'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:367:in `log'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:127:in `execute'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:205:in `create_table'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:649:in `block in method_missing'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:621:in `block in say_with_time'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:621:in `say_with_time'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:641:in `method_missing'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:406:in `method_missing'
/home/apps/api/releases/20141107204423/db/migrate/20140517050649_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb:8:in `up'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:558:in `up'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:598:in `exec_migration'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:579:in `block (2 levels) in migrate'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:578:in `block in migrate'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:294:in `with_connection'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:577:in `migrate'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:752:in `migrate'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:992:in `block in execute_migration_in_transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:1038:in `block in ddl_transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `block in transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:219:in `within_new_transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/transactions.rb:208:in `transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:1038:in `ddl_transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:991:in `execute_migration_in_transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:953:in `block in migrate'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:949:in `each'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:949:in `migrate'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:807:in `up'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:785:in `migrate'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/railties/databases.rake:34:in `block (2 levels) in <top (required)>'
ActiveRecord::StatementInvalid: PG::DuplicateTable: ERROR:  relation "taggings" already exists
: CREATE TABLE "taggings" ("id" serial primary key, "tag_id" integer, "taggable_id" integer, "taggable_type" character varying(255), "tagger_id" integer, "tagger_type" character varying(255), "context" character varying(128), "created_at" timestamp)
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `async_exec'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `block in execute'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:373:in `block in log'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:367:in `log'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:127:in `execute'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:205:in `create_table'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:649:in `block in method_missing'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:621:in `block in say_with_time'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:621:in `say_with_time'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:641:in `method_missing'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:406:in `method_missing'
/home/apps/api/releases/20141107204423/db/migrate/20140517050649_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb:8:in `up'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:558:in `up'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:598:in `exec_migration'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:579:in `block (2 levels) in migrate'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:578:in `block in migrate'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:294:in `with_connection'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:577:in `migrate'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:752:in `migrate'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:992:in `block in execute_migration_in_transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:1038:in `block in ddl_transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `block in transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:219:in `within_new_transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/transactions.rb:208:in `transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:1038:in `ddl_transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:991:in `execute_migration_in_transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:953:in `block in migrate'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:949:in `each'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:949:in `migrate'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:807:in `up'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:785:in `migrate'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/railties/databases.rake:34:in `block (2 levels) in <top (required)>'
PG::DuplicateTable: ERROR:  relation "taggings" already exists
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `async_exec'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `block in execute'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:373:in `block in log'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:367:in `log'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:127:in `execute'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:205:in `create_table'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:649:in `block in method_missing'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:621:in `block in say_with_time'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:621:in `say_with_time'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:641:in `method_missing'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:406:in `method_missing'
/home/apps/api/releases/20141107204423/db/migrate/20140517050649_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb:8:in `up'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:558:in `up'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:598:in `exec_migration'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:579:in `block (2 levels) in migrate'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:578:in `block in migrate'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:294:in `with_connection'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:577:in `migrate'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:752:in `migrate'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:992:in `block in execute_migration_in_transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:1038:in `block in ddl_transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `block in transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:219:in `within_new_transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/transactions.rb:208:in `transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:1038:in `ddl_transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:991:in `execute_migration_in_transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:953:in `block in migrate'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:949:in `each'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:949:in `migrate'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:807:in `up'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:785:in `migrate'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/railties/databases.rake:34:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
deploy@apistaging:/home/apps/api/current$
==20140517050649 ActsaStagGableon迁移:迁移========================
--创建表格(:标记)
->0.0057s
--创建表格(:标记)
雷克流产了!
StandardError:发生错误,此迁移和所有后续迁移已取消:
PG::DuplicateTable:错误:关系“标记”已存在
:创建表“taggings”(“id”序列主键、“tag_id”整数、“taggable_id”整数、“taggable_type”字符变化(255)、“tagger_id”整数、“tagger_type”字符变化(255)、“context”字符变化(128)、“created_at”时间戳)/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/connection\u adapters/postgresql/database\u statements.rb:128:in`async\u exec'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/connection\u adapters/postgresql/database\u语句。rb:128:in'block in execute'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/connection\u adapters/abstract\u adapter.rb:373:in`block in log'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active\u support/notifications/instrumenter.rb:20:in'instrument'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/connection\u adapters/abstract\u adapter.rb:367:in'log'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/connection\u adapters/postgresql/database\u语句。rb:127:in'execute'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/connection\u adapters/abstract/schema\u statements.rb:205:in'create\u table'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/migration.rb:649:in'block in method_missing'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/migration.rb:621:in`block in say_with_time'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/migration.rb:621:in'say\u with_time'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/migration.rb:641:in'method\u missing'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/migration.rb:406:in'method\u missing'
/home/apps/api/releases/20141107204423/db/migrate/20140517050649在迁移上作为标记。在引擎上作为标记。rb:8:in'up'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/migration.rb:558:in'up'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/migration.rb:598:in'exec\u migration'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:579:migrate中的block(2个级别)中
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/migration.rb:578:in“block in migrate”
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/connection\u adapters/abstract/connection\u pool.rb:294:in“with\u connection”
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/migration.rb:577:in“migrate”
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/migration.rb:752:in“migrate”
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/migration.rb:992:in`block in execute\u migration\u in_transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:1038:in`block in ddl_transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/connection\u adapters/abstract/database\u语句。rb:211:在“事务中的块”中
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/connection\u adapters/abstract/database\u statements.rb:219:in'within_new\u transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/connection\u adapters/abstract/database\u语句。rb:211:在“事务”中
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/transactions.rb:208:in'transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/migration.rb:1038:in'ddl\u transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/migration.rb:991:in'execute\u migration\u in\u transaction'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/migration.rb:953:in'block in migrate'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/migration.rb:949:in'each'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/migration.rb:949:in'migrate'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/migration.rb:807:in'up'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/migration.rb:785:in“migrate”
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/railties/databases.rake:34:in“block(2层)in”
ActiveRecord::语句无效:PG::DuplicateTable:错误:关系“标记”已存在
:创建表“taggings”(“id”序列主键、“tag_id”整数、“taggable_id”整数、“taggable_type”字符变化(255)、“tagger_id”整数、“tagger_type”字符变化(255)、“context”字符变化(128)、“created_at”时间戳)
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/connection\u adapters/postgresql/database\u语句。rb:128:in'async\u exec'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/connection\u adapters/postgresql/database\u语句。rb:128:in'block in execute'
/home/apps/api/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active\u record/connection\u adapters/abstract\u adapter.rb:373:in`block in log'
/主页/应用程序/api/
# This migration comes from acts_as_taggable_on_engine (originally 1)
class CreateTags < ActiveRecord::Migration
  def change
    drop_table 'tags' unless !ActiveRecord::Base.connection.table_exists? 'tags'

    create_table :tags do |t|
      t.string :name
    end
  end

  def self.down
    drop_table :tags
  end
end
# This migration comes from acts_as_taggable_on_engine (originally 1)
class CreateTaggings < ActiveRecord::Migration
  def change
    drop_table 'taggings' unless !ActiveRecord::Base.connection.table_exists? 'taggings'

    create_table :taggings do |t|
      t.references :tag

      # You should make sure that the column created is
      # long enough to store the required class names.
      t.references :taggable, :polymorphic => true
      t.references :tagger, :polymorphic => true

      # Limit is created to prevent MySQL error on index
      # length for MyISAM table type: http://bit.ly/vgW2Ql
      t.string :context, :limit => 128

      t.datetime :created_at
    end

    add_index :taggings, :tag_id
    add_index :taggings, [:taggable_id, :taggable_type, :context]
  end

  def self.down
    drop_table :taggings
  end
end