# Новая установка не удаётся (чистая установка)

**URL:** <https://meta.discourse.org/t/new-installation-fails-fresh-install/147461>\
**Category:** Bug\
**Created:** [09.Апрель.2020 19:35:53 UTC](https://meta.discourse.org/t/new-installation-fails-fresh-install/147461 "2020-04-09T19:35:53Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![oiler](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/oiler/32/120225_2.png) [@oiler](https://meta.discourse.org/u/oiler)\
**Post date:** [09.Апрель.2020 19:35:54 UTC](https://meta.discourse.org/t/new-installation-fails-fresh-install/147461/1 "2020-04-09T19:35:54Z")

</div>

Возможно, это связано с [147425](https://meta.discourse.org/t/new-installation-fails-on-migration/147425), но я создал новую тему, так как в моём случае речь шла о чистой установке, а не о миграции.

Я пытался выполнить установку через Docker-скрипт на двух разных чистых экземплярах Ubuntu 18.04 (один на Linode, другой на Digital Ocean). В обоих случаях я получил одну и ту же ошибку.

Скриншот ошибки:  
[![](https://global.discourse-cdn.com/meta/original/3X/6/f/6f49257f3f95ff3fb166d770160431c157a83f8a.jpeg) ](https://dl.dropboxusercontent.com/s/e4cmf38j4g083c4/Screenshot%202020-04-09%2014.32.38.png?dl=0)

Текст ошибки:

```plaintext
== 20180917024729 RemoveSuperfluousColumns: migrating =========================

WARNING
-------------------------------------------------------------------------------------
An attempt was made to drop or rename a column in a migration
SQL used was: 'ALTER TABLE user_profiles DROP COLUMN IF EXISTS card_image_badge_id'

Please generate a post deployment migration using `rails g post_migration` to drop
or rename columns.

Note, to minimize disruption use self.ignored_columns = ["column name"] on your
ActiveRecord model, this can be removed 6 months or so later.

This protection is in place to protect us against dropping columns that are currently
in use by live applications.

I, [2020-04-09T15:07:30.875957 #1] INFO -- : Terminating async processes
I, [2020-04-09T15:07:30.876041 #1] INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/10/bin/postmaster -D /etc/postgresql/10/main pid: 64
2020-04-09 15:07:30.876 UTC [64] LOG: received fast shutdown request
I, [2020-04-09T15:07:30.876354 #1] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 181
181:signal-handler (1586444850) Received SIGTERM scheduling shutdown...
181:M 09 Apr 2020 15:07:30.954 # User requested shutdown...
181:M 09 Apr 2020 15:07:30.954 * Saving the final RDB snapshot before exiting.
181:M 09 Apr 2020 15:07:30.959 * DB saved on disk
181:M 09 Apr 2020 15:07:30.960 # Redis is now ready to exit, bye bye...
2020-04-09 15:07:30.880 UTC [64] LOG: aborting any active transactions
2020-04-09 15:07:30.886 UTC [64] LOG: worker process: logical replication launcher (PID 73) exited with exit code 1
2020-04-09 15:07:30.894 UTC [68] LOG: shutting down
2020-04-09 15:07:31.151 UTC [64] LOG: database system is shut down

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 12943 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
90378b39f271ddf9c4ba2628e28ceffd9ede8f3c6cdb4815b12f8b3ae5a218ac
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

```

Ошибка возникла при попытке выполнить миграцию базы данных. Система предупреждает, что была предпринята попытка удалить или переименовать столбец в миграции, что может нарушить работу активных приложений. Рекомендуется сгенерировать миграцию после развёртывания с помощью команды `rails g post_migration`. Для минимизации нарушений можно временно добавить `self.ignored_columns = ["column name"]` в модель ActiveRecord, а затем удалить это изменение через несколько месяцев.

---

_[View the full topic](https://meta.discourse.org/t/new-installation-fails-fresh-install/147461)._
