Platoniq / decidim-install

A step-by-step guide to install Decidim on a production site
https://platoniq.github.io/decidim-install/
GNU Affero General Public License v3.0
54 stars 35 forks source link

adding gem does not insert tables into postgres #77

Open mauriziomarini opened 3 years ago

mauriziomarini commented 3 years ago

Hello I have completed 1^ step: https://platoniq.github.io/decidim-install/decidim-focal/ Now I open Gemfile and uncomment the decidim gem

befor: gem "decidim", "0.24.2"

gem "decidim-conferences", "0.24.2"

gem "decidim-consultations", "0.24.2"

gem "decidim-elections", "0.24.2"

gem "decidim-initiatives", "0.24.2"

gem "decidim-templates", "0.24.2"

after: gem "decidim", "0.24.2" gem "decidim-conferences", "0.24.2" gem "decidim-consultations", "0.24.2" gem "decidim-elections", "0.24.2" gem "decidim-initiatives", "0.24.2" gem "decidim-templates", "0.24.2"

then bundle install; bin/rails generate delayed_job:active_record; bin/rake db:migrate;sudo passenger-config restart-app ~/decidim-app

Now applicatiosn does stop working b/c tables are missing:

I, [2021-05-19T19:23:06.400296 #77053] INFO -- : [8dca8335-47c3-4bd3-9738-08a67f00fe1c] Rendered /home/decidim/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/decidim-core-0.24.2/app/views/decidim/homepage/show.html.erb within layouts/decidim/application (12.3ms) I, [2021-05-19T19:23:06.400665 #77053] INFO -- : [8dca8335-47c3-4bd3-9738-08a67f00fe1c] Completed 500 Internal Server Error in 29ms (ActiveRecord: 7.4ms) F, [2021-05-19T19:23:06.402811 #77053] FATAL -- : [8dca8335-47c3-4bd3-9738-08a67f00fe1c]
F, [2021-05-19T19:23:06.402873 #77053] FATAL -- : [8dca8335-47c3-4bd3-9738-08a67f00fe1c] ActionView::Template::Error (PG::UndefinedTable: ERROR: relation "decidim_initiatives" does not exist LINE 8: WHERE a.attrelid = '"decidim_initiatives"'::r... ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod, c.collname, col_description(a.attrelid, a.attnum) AS comment FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum LEFT JOIN pg_type t ON a.atttypid = t.oid LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation WHERE a.attrelid = '"decidim_initiatives"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum ): F, [2021-05-19T19:23:06.403018 #77053] FATAL -- : [8dca8335-47c3-4bd3-9738-08a67f00fe1c] 9: [8dca8335-47c3-4bd3-9738-08a67f00fe1c] 10: <% Decidim::ContentBlock.published.for_scope(:homepage, organization: current_organization).each do |content_block| %> [8dca8335-47c3-4bd3-9738-08a67f00fe1c] 11: <% next unless content_block.manifest %> [8dca8335-47c3-4bd3-9738-08a67f00fe1c] 12: <%= cell content_block.manifest.cell, content_block %> [8dca8335-47c3-4bd3-9738-08a67f00fe1c] 13: <% end %> F, [2021-05-19T19:23:06.403045 #77053] FATAL -- : [8dca8335-47c3-4bd3-9738-08a67f00fe1c]
F, [2021-05-19T19:23:06.403109 #77053] FATAL -- : [8dca8335-47c3-4bd3-9738-08a67f00fe1c] activerecord (5.2.6) lib/active_record/connection_adapters/postgresql/database_statements.rb:63:in async_exec' [8dca8335-47c3-4bd3-9738-08a67f00fe1c] activerecord (5.2.6) lib/active_record/connection_adapters/postgresql/database_statements.rb:63:inblock (2 levels) in query'

Can you clarify what should I do after uncommenting gems? Best regards