diff --git a/.github/workflows/test_app.yml b/.github/workflows/test_app.yml index 0e4b0adbc2943..0b6a75120a661 100644 --- a/.github/workflows/test_app.yml +++ b/.github/workflows/test_app.yml @@ -95,6 +95,8 @@ jobs: with: chromedriver-version: ${{inputs.chrome_version}} name: Install Chrome version ${{inputs.chrome_version}} + - run: | + sudo apt install wkhtmltopdf - uses: actions/cache@v4 id: app-cache with: diff --git a/Gemfile.lock b/Gemfile.lock index c5a39b91c371b..210d604f7c22c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -54,7 +54,6 @@ PATH decidim-core (= 0.30.0.dev) decidim-meetings (= 0.30.0.dev) wicked_pdf (~> 2.7) - wkhtmltopdf-binary (= 0.12.6.6) decidim-core (0.30.0.dev) active_link_to (~> 1.0) acts_as_list (~> 1.0) @@ -152,7 +151,6 @@ PATH decidim-forms (0.30.0.dev) decidim-core (= 0.30.0.dev) wicked_pdf (~> 2.1) - wkhtmltopdf-binary (= 0.12.6.6) decidim-generators (0.30.0.dev) decidim-core (= 0.30.0.dev) decidim-initiatives (0.30.0.dev) @@ -162,7 +160,6 @@ PATH decidim-verifications (= 0.30.0.dev) hexapdf (~> 0.32.0) wicked_pdf (~> 2.1) - wkhtmltopdf-binary (= 0.12.6.6) decidim-meetings (0.30.0.dev) decidim-core (= 0.30.0.dev) decidim-forms (= 0.30.0.dev) @@ -788,7 +785,6 @@ GEM activesupport wisper (2.0.1) wisper-rspec (1.1.0) - wkhtmltopdf-binary (0.12.6.6) xpath (3.2.0) nokogiri (~> 1.8) zeitwerk (2.6.18) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index d2683c596e50d..34801c39207c0 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -17,6 +17,7 @@ gem "decidim-dev", github: "decidim/decidim" ```console sudo apt install p7zip # or the alternative installation process for your operating system. See "2.1. 7zip dependency introduction" +sudo apt install wkhtmltopdf # or the alternative installation process for your operating system. See "2.7. wkhtmltopdf binary change" bundle remove spring spring-watcher-listen bundle update decidim bin/rails decidim:upgrade @@ -110,6 +111,18 @@ bin/rails decidim_proposals:upgrade:set_categories You can read more about this change on PR [#13395](https://github.com/decidim/decidim/pull/13395). +### 2.7. wkhtmltopdf binary change + +For improving the support with latest versions of Ubuntu, and keeping a low size in Heroku/Docker images, we removed the `wkhtmltopdf-binary` gem dependency. This means that your package manager should have the `wkhtmltopdf` binary installed. + +In the case of Ubuntu/Debian, this is done with the following command: + +```bash +sudo apt install wkhtmltopdf +``` + +You can read more about this change on PR [#XXXX](https://github.com/decidim/decidim/pull/XXXX). + ## 3. One time actions These are one time actions that need to be done after the code is updated in the production database. diff --git a/decidim-conferences/config/initializers/wicked_pdf.rb b/decidim-conferences/config/initializers/wicked_pdf.rb index 150d9b175c5cd..898d756acb8c6 100644 --- a/decidim-conferences/config/initializers/wicked_pdf.rb +++ b/decidim-conferences/config/initializers/wicked_pdf.rb @@ -15,7 +15,6 @@ # one of the wkhtmltopdf-binary family of gems. # or # config.exe_path = '/usr/local/bin/wkhtmltopdf', - config.exe_path = Gem.bin_path("wkhtmltopdf-binary", "wkhtmltopdf") # Layout file to be used for all PDFs # (but can be overridden in `render :pdf` calls) diff --git a/decidim-conferences/decidim-conferences.gemspec b/decidim-conferences/decidim-conferences.gemspec index b764e2256b491..bce089f3f82ec 100644 --- a/decidim-conferences/decidim-conferences.gemspec +++ b/decidim-conferences/decidim-conferences.gemspec @@ -33,10 +33,6 @@ Gem::Specification.new do |s| s.add_dependency "decidim-core", Decidim::Conferences.version s.add_dependency "decidim-meetings", Decidim::Conferences.version s.add_dependency "wicked_pdf", "~> 2.7" - # Latest version of wkhtmltopdf-binary downloads more versions of the binary - # This brings problems with deployment in certain environments, as Heroku - # Hopefully they will fix this situation soon - s.add_dependency "wkhtmltopdf-binary", "= 0.12.6.6" s.add_development_dependency "decidim-admin", Decidim::Conferences.version s.add_development_dependency "decidim-dev", Decidim::Conferences.version diff --git a/decidim-forms/config/initializers/wicked_pdf.rb b/decidim-forms/config/initializers/wicked_pdf.rb index 3fd5c97f83449..322b557851325 100644 --- a/decidim-forms/config/initializers/wicked_pdf.rb +++ b/decidim-forms/config/initializers/wicked_pdf.rb @@ -19,7 +19,6 @@ # one of the wkhtmltopdf-binary family of gems. # or # config.exe_path = '/usr/local/bin/wkhtmltopdf', - config.exe_path = Gem.bin_path("wkhtmltopdf-binary", "wkhtmltopdf") # Layout file to be used for all PDFs # (but can be overridden in `render :pdf` calls) diff --git a/decidim-forms/decidim-forms.gemspec b/decidim-forms/decidim-forms.gemspec index 50011c054ba9e..72ea2ab9b58d6 100644 --- a/decidim-forms/decidim-forms.gemspec +++ b/decidim-forms/decidim-forms.gemspec @@ -34,10 +34,6 @@ Gem::Specification.new do |s| s.add_dependency "decidim-core", Decidim::Forms.version s.add_dependency "wicked_pdf", "~> 2.1" - # Latest version of wkhtmltopdf-binary downloads more versions of the binary - # This brings problems with deployment in certain environments, as Heroku - # Hopefully they will fix this situation soon - s.add_dependency "wkhtmltopdf-binary", "= 0.12.6.6" s.add_development_dependency "decidim-admin", Decidim::Forms.version s.add_development_dependency "decidim-dev", Decidim::Forms.version diff --git a/decidim-generators/Gemfile.lock b/decidim-generators/Gemfile.lock index 338e4af7bc1e0..38a6c5dad70ce 100644 --- a/decidim-generators/Gemfile.lock +++ b/decidim-generators/Gemfile.lock @@ -54,7 +54,6 @@ PATH decidim-core (= 0.30.0.dev) decidim-meetings (= 0.30.0.dev) wicked_pdf (~> 2.7) - wkhtmltopdf-binary (= 0.12.6.6) decidim-core (0.30.0.dev) active_link_to (~> 1.0) acts_as_list (~> 1.0) @@ -152,7 +151,6 @@ PATH decidim-forms (0.30.0.dev) decidim-core (= 0.30.0.dev) wicked_pdf (~> 2.1) - wkhtmltopdf-binary (= 0.12.6.6) decidim-generators (0.30.0.dev) decidim-core (= 0.30.0.dev) decidim-initiatives (0.30.0.dev) @@ -162,7 +160,6 @@ PATH decidim-verifications (= 0.30.0.dev) hexapdf (~> 0.32.0) wicked_pdf (~> 2.1) - wkhtmltopdf-binary (= 0.12.6.6) decidim-meetings (0.30.0.dev) decidim-core (= 0.30.0.dev) decidim-forms (= 0.30.0.dev) @@ -790,7 +787,6 @@ GEM activesupport wisper (2.0.1) wisper-rspec (1.1.0) - wkhtmltopdf-binary (0.12.6.6) xpath (3.2.0) nokogiri (~> 1.8) zeitwerk (2.6.18) diff --git a/decidim-initiatives/config/initializers/wicked_pdf.rb b/decidim-initiatives/config/initializers/wicked_pdf.rb index 150d9b175c5cd..898d756acb8c6 100644 --- a/decidim-initiatives/config/initializers/wicked_pdf.rb +++ b/decidim-initiatives/config/initializers/wicked_pdf.rb @@ -15,7 +15,6 @@ # one of the wkhtmltopdf-binary family of gems. # or # config.exe_path = '/usr/local/bin/wkhtmltopdf', - config.exe_path = Gem.bin_path("wkhtmltopdf-binary", "wkhtmltopdf") # Layout file to be used for all PDFs # (but can be overridden in `render :pdf` calls) diff --git a/decidim-initiatives/decidim-initiatives.gemspec b/decidim-initiatives/decidim-initiatives.gemspec index 564c94cc61cab..a189e5bb944f3 100644 --- a/decidim-initiatives/decidim-initiatives.gemspec +++ b/decidim-initiatives/decidim-initiatives.gemspec @@ -36,10 +36,6 @@ Gem::Specification.new do |s| s.add_dependency "decidim-verifications", Decidim::Initiatives.version s.add_dependency "hexapdf", "~> 0.32.0" s.add_dependency "wicked_pdf", "~> 2.1" - # Latest version of wkhtmltopdf-binary downloads more versions of the binary - # This brings problems with deployment in certain environments, as Heroku - # Hopefully they will fix this situation soon - s.add_dependency "wkhtmltopdf-binary", "= 0.12.6.6" s.add_development_dependency "decidim-dev", Decidim::Initiatives.version s.add_development_dependency "decidim-meetings", Decidim::Initiatives.version diff --git a/docs/modules/install/pages/manual.adoc b/docs/modules/install/pages/manual.adoc index 8301901830eb9..ff292d216b211 100644 --- a/docs/modules/install/pages/manual.adoc +++ b/docs/modules/install/pages/manual.adoc @@ -27,7 +27,7 @@ First, we are going to install https://github.com/rbenv/rbenv[rbenv], for managi [source,bash] ---- sudo apt update -sudo apt install -y build-essential curl git libssl-dev zlib1g-dev p7zip +sudo apt install -y build-essential curl git libssl-dev zlib1g-dev p7zip wkhtmltopdf git clone https://github.com/rbenv/rbenv.git ~/.rbenv echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc echo 'eval "$(rbenv init -)"' >> ~/.bashrc