Previously I was able to access Forem files by opening a Rails container, but now that container won't start. So I can't access the application.rb file.
After restarting with the command sudo systemctl restart forem.service, the container with Rails appears, but after a few seconds it immediately disappears.
I'm not really familiar with this set up. If the container now dies, perhaps there's something wrong with the config file. Where did you add this line mentioned in the previous comment?
I haven't added it anywhere yet. I wanted to add it to forem/config
/application.rb, but as I already wrote, I can't open the Rails container to change the file. After installing Forem, this problem with Rails immediately appears :)
When starting Rails, it gives an error. The logs indicate this:
Nov0601:37:51www.informland.comforem-rails-bootstrap[7552]:Disablepartialwritesinconfig/application.rb:Nov0601:37:51www.informland.comforem-rails-bootstrap[7552]:Nov0601:37:51www.informland.comforem-rails-bootstrap[7552]:config.active_record.partial_inserts=falseNov0601:37:51www.informland.comforem-rails-bootstrap[7552]:Nov0601:37:51www.informland.comforem-rails[7527]:railsaborted!Nov0601:37:51www.informland.comforem-rails[7527]:StandardError:Anerrorhasoccurred,thisandalllatermigrationscanceled:(StandardError)Nov0601:37:51www.informland.comforem-rails[7527]:===Dangerousoperationdetected#strong_migrations ===Nov0601:37:51www.informland.comforem-rails[7527]:Partialwritesareenabled,whichcancauseincorrectvaluesNov0601:37:51www.informland.comforem-rails[7527]:tobeinsertedwhenchangingthedefaultvalueofacolumn.Nov0601:37:51www.informland.comforem-rails[7527]:Disablepartialwritesinconfig/application.rb:Nov0601:37:51www.informland.comforem-rails[7527]:config.active_record.partial_inserts=falseNov0601:37:51www.informland.comforem-rails-bootstrap[7552]:/opt/apps/forem/db/migrate/20201019012200_change_email_preference_default_values.rb:3:in`change'
Nov 06 01:37:51 www.informland.com forem-rails-bootstrap[7552]: Tasks: TOP => db:prepare
Nov 06 01:37:51 www.informland.com forem-rails-bootstrap[7552]: (See full trace by running task with --trace)
Nov 06 01:37:51 www.informland.com forem-rails[7527]: /opt/apps/forem/db/migrate/20201019012200_change_email_preference_default_values.rb:3:in `change'
Nov 06 01:37:51 www.informland.com forem-rails[7527]: Tasks: TOP => db:prepare
Nov 06 01:37:51 www.informland.com forem-rails[7527]: (See full trace by running task with --trace)
Nov 06 01:37:51 www.informland.com forem-rails-bootstrap[7552]: I, [2024-11-06T01:37:50.024271 #23] INFO -- ddtrace: [ddtrace] DATADOG CONFIGURATION - PROFILING - {"profiling_enabled">
Nov 06 01:37:51 www.informland.com forem-rails-bootstrap[7552]: I, [2024-11-06T01:37:50.031794 #23] INFO -- ddtrace: [ddtrace] DATADOG CONFIGURATION - CORE - {"date":"2024-11-06T01:37>
Nov 06 01:37:51 www.informland.com forem-rails-bootstrap[7552]: I, [2024-11-06T01:37:50.788441 #23] INFO -- honeybadger: ** [Honeybadger] Initializing Honeybadger Error Tracker for Ru>
Nov 06 01:37:51 www.informland.com forem-rails-bootstrap[7552]: I, [2024-11-06T01:37:51.795942 #23] INFO -- : Migrating to ChangeEmailPreferenceDefaultValues (20201019012200)
Nov 06 01:37:51 www.informland.com forem-rails-bootstrap[7552]: == 20201019012200 ChangeEmailPreferenceDefaultValues: migrating ===============
Nov 06 01:37:51 www.informland.com forem-rails-bootstrap[7552]: E, [2024-11-06T01:37:51.813351 #23] ERROR -- honeybadger: ** [Honeybadger] Unable to send error report: API key is missi>
Nov 06 01:37:51 www.informland.com forem-rails[7527]: I, [2024-11-06T01:37:50.024271 #23] INFO -- ddtrace: [ddtrace] DATADOG CONFIGURATION - PROFILING - {"profiling_enabled":false}
Nov 06 01:37:51 www.informland.com forem-rails[7527]: I, [2024-11-06T01:37:50.031794 #23] INFO -- ddtrace: [ddtrace] DATADOG CONFIGURATION - CORE - {"date":"2024-11-06T01:37:50+00:00">
Nov 06 01:37:51 www.informland.com forem-rails[7527]: I, [2024-11-06T01:37:50.788441 #23] INFO -- honeybadger: ** [Honeybadger] Initializing Honeybadger Error Tracker for Ruby. Ship i>
Nov 06 01:37:51 www.informland.com forem-rails[7527]: I, [2024-11-06T01:37:51.795942 #23] INFO -- : Migrating to ChangeEmailPreferenceDefaultValues (20201019012200)
Nov 06 01:37:51 www.informland.com forem-rails[7527]: == 20201019012200 ChangeEmailPreferenceDefaultValues: migrating ===============
Nov 06 01:37:51 www.informland.com forem-rails[7527]: E, [2024-11-06T01:37:51.813351 #23] ERROR -- honeybadger: ** [Honeybadger] Unable to send error report: API key is missing. id=ed5>
Nov 06 01:37:51 www.informland.com conmon[7552]: conmon 707de065670f2dfb4e55 <nwarn>: Failed to open cgroups file: /sys/fs/cgroup/machine.slice/machine-libpod_pod_059e3778034af6e7ab375>
Nov 06 01:37:51 www.informland.com podman[7527]: 2024-11-06 01:37:51.897910895 +0000 UTC m=+15.670031717 container died 707de065670f2dfb4e553ddb1d080dd117372942c5abd1358a34a0e8f7a20648>
Nov 06 01:37:52 www.informland.com podman[7612]: 2024-11-06 01:37:52.111013065 +0000 UTC m=+0.197569767 container remove 707de065670f2dfb4e553ddb1d080dd117372942c5abd1358a34a0e8f7a2064>
Nov 06 01:37:52 www.informland.com podman[7612]: 2024-11-06 01:37:52.173605736 +0000 UTC m=+0.260162464 volume remove 9f13dadbb4943e27420eb3e47c3bbac716526ecaa896acd9606ef4a4ccde79fb
Nov 06 01:37:52 www.informland.com systemd[1]: forem-rails.service: Control process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ An ExecStartPre= process belonging to unit forem-rails.service has exited.
░░
░░ The process'exitcodeis'exited'anditsexitstatusis1.Nov0601:37:52www.informland.comsystemd[1]:forem-rails.service:Failedwithresult'exit-code'.░░Subject:Unitfailed░░Defined-By:systemd░░Support:https://lists.freedesktop.org/mailman/listinfo/systemd-devel░░░░Theunitforem-rails.servicehasenteredthe'failed'statewithresult'exit-code'.Nov0601:37:52www.informland.comsystemd[1]:Failedtostartforem-rails.service-ForemRailsService.░░Subject:Astartjobforunitforem-rails.servicehasfailed░░Defined-By:systemd░░Support:https://lists.freedesktop.org/mailman/listinfo/systemd-devel░░░░Astartjobforunitforem-rails.servicehasfinishedwithafailure.░░░░Thejobidentifieris13892andthejobresultisfailed.Nov0601:37:52www.informland.comsystemd[1]:forem-rails.service:Consumed1.551sCPUtime.░░Subject:Resourcesconsumedbyunitruntime░░Defined-By:systemd░░Support:https://lists.freedesktop.org/mailman/listinfo/systemd-devel░░░░Theunitforem-rails.servicecompletedandconsumedtheindicatedresources.
The unit forem-rails.service has entered the 'failed' state with result 'exit-code'.
Failed to start forem-rails.service - Forem Rails Service.
This is most likely a bug in Forem. The migration
ChangeEmailPreferenceDefaultValuesdoes not pass static checks from strong_migrations gem.The fix is rather simple. Go to
config/application.rband disable partial writes withBut it should be fixed in the code of Forem too, I think.
Hi @katafrakt ! Thanks for the answer. But in the config github.com/forem/forem/blob/main/c... I didn't find this line:
Should I just add it?
Yes. It should be safe to add.
@katafrakt Pawel, I forgot which folder the Forem files are in?
Previously I was able to access Forem files by opening a Rails container, but now that container won't start. So I can't access the application.rb file.
After restarting with the command sudo systemctl restart forem.service, the container with Rails appears, but after a few seconds it immediately disappears.
I'm not really familiar with this set up. If the container now dies, perhaps there's something wrong with the config file. Where did you add this line mentioned in the previous comment?
I haven't added it anywhere yet. I wanted to add it to forem/config
/application.rb, but as I already wrote, I can't open the Rails container to change the file. After installing Forem, this problem with Rails immediately appears :)
When starting Rails, it gives an error. The logs indicate this:
Hi, did you solve this problem? I'm also facing the same problem.
Hi, yes. informland.com/
Das war eine Probleme mit DB.