Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding gem does not insert tables into postgres #77

Open
mauriziomarini opened this issue May 19, 2021 · 0 comments
Open

adding gem does not insert tables into postgres #77

mauriziomarini opened this issue May 19, 2021 · 0 comments

Comments

@mauriziomarini
Copy link

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:in block (2 levels) in query'

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

@mauriziomarini mauriziomarini changed the title adding gem does not inser tables into postgres adding gem does not insert tables into postgres May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant