Error running migrations for development on Ubuntu


(Blake Erickson) #1

When I run:

bundle exec rake db:migrate db:test:prepare db:seed_fu

I’m getting the following error:

== 20140120155706 AddLoungeCategory: migrating ================================
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::UndefinedTable: ERROR:  relation "translation_overrides" does not exist
LINE 5:                WHERE a.attrelid = '"translation_overrides"':...
                                          ^
:               SELECT a.attname, format_type(a.atttypid, a.atttypmod),
                     pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
                FROM pg_attribute a LEFT JOIN pg_attrdef d
                  ON a.attrelid = d.adrelid AND a.attnum = d.adnum
               WHERE a.attrelid = '"translation_overrides"'::regclass
                 AND a.attnum > 0 AND NOT a.attisdropped
               ORDER BY a.attnum
/home/blake/.rvm/gems/ruby-2.2.3/gems/rack-mini-profiler-0.9.7/lib/patches/db/pg.rb:90:in `exec'
/home/blake/.rvm/gems/ruby-2.2.3/gems/rack-mini-profiler-0.9.7/lib/patches/db/pg.rb:90:in `async_exec'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql_adapter.rb:596:in `block in exec_no_cache'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.4/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql_adapter.rb:596:in `exec_no_cache'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql_adapter.rb:588:in `execute_and_clear'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:160:in `exec_query'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql_adapter.rb:737:in `column_definitions'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql/schema_statements.rb:186:in `columns'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/schema_cache.rb:43:in `columns'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/attributes.rb:93:in `columns'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/attributes.rb:98:in `columns_hash'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/relation/query_methods.rb:969:in `block in create_binds'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/relation/query_methods.rb:967:in `each'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/relation/query_methods.rb:967:in `partition'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/relation/query_methods.rb:967:in `create_binds'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/relation/query_methods.rb:954:in `build_where'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/relation/query_methods.rb:584:in `where!'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/relation/query_methods.rb:574:in `where'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/querying.rb:10:in `where'
/home/blake/code/discourse/lib/i18n/backend/discourse_i18n.rb:26:in `overrides_for'
/home/blake/code/discourse/lib/i18n/backend/discourse_i18n.rb:45:in `translate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/i18n-0.7.0/lib/i18n.rb:158:in `block in translate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/i18n-0.7.0/lib/i18n.rb:154:in `catch'
/home/blake/.rvm/gems/ruby-2.2.3/gems/i18n-0.7.0/lib/i18n.rb:154:in `translate'
/home/blake/code/discourse/lib/freedom_patches/translate_accelerator.rb:59:in `block in translate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/lru_redux-1.1.0/lib/lru_redux/cache.rb:34:in `getset'
/home/blake/.rvm/gems/ruby-2.2.3/gems/lru_redux-1.1.0/lib/lru_redux/util/safe_sync.rb:26:in `block in getset'
/home/blake/.rvm/gems/ruby-2.2.3/gems/lru_redux-1.1.0/lib/lru_redux/util/safe_sync.rb:25:in `getset'
/home/blake/code/discourse/lib/freedom_patches/translate_accelerator.rb:58:in `translate'
/home/blake/code/discourse/db/migrate/20140120155706_add_lounge_category.rb:6:in `up'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:608:in `exec_migration'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:589:in `block (2 levels) in migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:588:in `block in migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:587:in `migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:765:in `migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:995:in `block in execute_migration_in_transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:1041:in `block in ddl_transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/transactions.rb:220:in `transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:1041:in `ddl_transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:994:in `execute_migration_in_transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:956:in `block in migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:952:in `each'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:952:in `migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:820:in `up'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:798:in `migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR:  relation "translation_overrides" does not exist
LINE 5:                WHERE a.attrelid = '"translation_overrides"':...
                                          ^
:               SELECT a.attname, format_type(a.atttypid, a.atttypmod),
                     pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
                FROM pg_attribute a LEFT JOIN pg_attrdef d
                  ON a.attrelid = d.adrelid AND a.attnum = d.adnum
               WHERE a.attrelid = '"translation_overrides"'::regclass
                 AND a.attnum > 0 AND NOT a.attisdropped
               ORDER BY a.attnum
/home/blake/.rvm/gems/ruby-2.2.3/gems/rack-mini-profiler-0.9.7/lib/patches/db/pg.rb:90:in `exec'
/home/blake/.rvm/gems/ruby-2.2.3/gems/rack-mini-profiler-0.9.7/lib/patches/db/pg.rb:90:in `async_exec'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql_adapter.rb:596:in `block in exec_no_cache'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.4/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql_adapter.rb:596:in `exec_no_cache'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql_adapter.rb:588:in `execute_and_clear'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:160:in `exec_query'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql_adapter.rb:737:in `column_definitions'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql/schema_statements.rb:186:in `columns'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/schema_cache.rb:43:in `columns'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/attributes.rb:93:in `columns'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/attributes.rb:98:in `columns_hash'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/relation/query_methods.rb:969:in `block in create_binds'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/relation/query_methods.rb:967:in `each'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/relation/query_methods.rb:967:in `partition'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/relation/query_methods.rb:967:in `create_binds'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/relation/query_methods.rb:954:in `build_where'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/relation/query_methods.rb:584:in `where!'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/relation/query_methods.rb:574:in `where'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/querying.rb:10:in `where'
/home/blake/code/discourse/lib/i18n/backend/discourse_i18n.rb:26:in `overrides_for'
/home/blake/code/discourse/lib/i18n/backend/discourse_i18n.rb:45:in `translate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/i18n-0.7.0/lib/i18n.rb:158:in `block in translate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/i18n-0.7.0/lib/i18n.rb:154:in `catch'
/home/blake/.rvm/gems/ruby-2.2.3/gems/i18n-0.7.0/lib/i18n.rb:154:in `translate'
/home/blake/code/discourse/lib/freedom_patches/translate_accelerator.rb:59:in `block in translate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/lru_redux-1.1.0/lib/lru_redux/cache.rb:34:in `getset'
/home/blake/.rvm/gems/ruby-2.2.3/gems/lru_redux-1.1.0/lib/lru_redux/util/safe_sync.rb:26:in `block in getset'
/home/blake/.rvm/gems/ruby-2.2.3/gems/lru_redux-1.1.0/lib/lru_redux/util/safe_sync.rb:25:in `getset'
/home/blake/code/discourse/lib/freedom_patches/translate_accelerator.rb:58:in `translate'
/home/blake/code/discourse/db/migrate/20140120155706_add_lounge_category.rb:6:in `up'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:608:in `exec_migration'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:589:in `block (2 levels) in migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:588:in `block in migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:587:in `migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:765:in `migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:995:in `block in execute_migration_in_transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:1041:in `block in ddl_transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/transactions.rb:220:in `transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:1041:in `ddl_transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:994:in `execute_migration_in_transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:956:in `block in migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:952:in `each'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:952:in `migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:820:in `up'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:798:in `migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
PG::UndefinedTable: ERROR:  relation "translation_overrides" does not exist
LINE 5:                WHERE a.attrelid = '"translation_overrides"':...
                                          ^
/home/blake/.rvm/gems/ruby-2.2.3/gems/rack-mini-profiler-0.9.7/lib/patches/db/pg.rb:90:in `exec'
/home/blake/.rvm/gems/ruby-2.2.3/gems/rack-mini-profiler-0.9.7/lib/patches/db/pg.rb:90:in `async_exec'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql_adapter.rb:596:in `block in exec_no_cache'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.4/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql_adapter.rb:596:in `exec_no_cache'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql_adapter.rb:588:in `execute_and_clear'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:160:in `exec_query'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql_adapter.rb:737:in `column_definitions'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql/schema_statements.rb:186:in `columns'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/schema_cache.rb:43:in `columns'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/attributes.rb:93:in `columns'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/attributes.rb:98:in `columns_hash'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/relation/query_methods.rb:969:in `block in create_binds'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/relation/query_methods.rb:967:in `each'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/relation/query_methods.rb:967:in `partition'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/relation/query_methods.rb:967:in `create_binds'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/relation/query_methods.rb:954:in `build_where'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/relation/query_methods.rb:584:in `where!'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/relation/query_methods.rb:574:in `where'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/querying.rb:10:in `where'
/home/blake/code/discourse/lib/i18n/backend/discourse_i18n.rb:26:in `overrides_for'
/home/blake/code/discourse/lib/i18n/backend/discourse_i18n.rb:45:in `translate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/i18n-0.7.0/lib/i18n.rb:158:in `block in translate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/i18n-0.7.0/lib/i18n.rb:154:in `catch'
/home/blake/.rvm/gems/ruby-2.2.3/gems/i18n-0.7.0/lib/i18n.rb:154:in `translate'
/home/blake/code/discourse/lib/freedom_patches/translate_accelerator.rb:59:in `block in translate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/lru_redux-1.1.0/lib/lru_redux/cache.rb:34:in `getset'
/home/blake/.rvm/gems/ruby-2.2.3/gems/lru_redux-1.1.0/lib/lru_redux/util/safe_sync.rb:26:in `block in getset'
/home/blake/.rvm/gems/ruby-2.2.3/gems/lru_redux-1.1.0/lib/lru_redux/util/safe_sync.rb:25:in `getset'
/home/blake/code/discourse/lib/freedom_patches/translate_accelerator.rb:58:in `translate'
/home/blake/code/discourse/db/migrate/20140120155706_add_lounge_category.rb:6:in `up'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:608:in `exec_migration'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:589:in `block (2 levels) in migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:588:in `block in migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:587:in `migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:765:in `migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:995:in `block in execute_migration_in_transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:1041:in `block in ddl_transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/transactions.rb:220:in `transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:1041:in `ddl_transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:994:in `execute_migration_in_transaction'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:956:in `block in migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:952:in `each'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:952:in `migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:820:in `up'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/migration.rb:798:in `migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/home/blake/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

I thought that it might be related to my locale so I checked that postgres was set to english:

 postgres=# SHOW LC_COLLATE;
 lc_collate  
-------------
 en_US.UTF-8
(1 row)

Before I debug further just wondering if anybody has an idea why I might be running into this issue for a migration that hasn’t been updated since May '15?


(Gerhard Schlager) #2

@eviltrout is working on a feature that allows overriding translations.
Unfortunately one of the older database migrations is using I18n before the table used for translation overrides is created.

I recommend you use the tests-passed branch until this is fixed. It’s only 3 commits behind master, so you’ll be fine.


(Blake Erickson) #3

Thanks, that did the trick.


(Sam Saffron) #4

Yeah real bad for migration files to use this, we will get it sorted


(Robin Ward) #5

I’ve fixed it up by introducing a helper to skip overrides:

https://github.com/discourse/discourse/commit/810a069cfd3d495b7817e0ac69a207842c9ddcde


(Robin Ward) #6