decidim-install icon indicating copy to clipboard operation
decidim-install copied to clipboard

Cannot install initiatives and consultations modules

Open magdalena-klein opened this issue 5 years ago • 7 comments

Hello, when i uncomment from the gem initiatives or consultation, i gives me a pdf error... i had to uncomment to get it work, but i dont know any other way to activate initiatives and consultations

i will thank any help because i need an instance with at least initiatives

andres

magdalena-klein avatar Nov 02 '19 13:11 magdalena-klein

Thats the error when i tried to uncomment initiatives:

decidim@decidim2-ubuntu-s-1vcpu-2gb-nyc1-01:~/decidim-app$ bin/rails decidim:upgrade rails aborted! NameError: uninitialized constant WickedPdf /home/decidim/decidim-app/config/environment.rb:5:in <main>' bin/rails:4:in

'

Caused by: NameError: uninitialized constant WickedPdf /home/decidim/decidim-app/config/environment.rb:5:in <main>' bin/rails:4:in

' Tasks: TOP => decidim:upgrade => railties:install:migrations => db:load_config => environment

magdalena-klein avatar Nov 02 '19 15:11 magdalena-klein

Maybe wickedpdf has to be required manually (require "wickedpdf" on top of the file), but I am not sure as I haven't used initiatives yet.

Can you ask this question here? https://gitter.im/decidim/decidim

Please provide your version of Decidim are you using.

microstudi avatar Nov 05 '19 09:11 microstudi

Thanks, i will ask there. I am using 0.19

magdalena-klein avatar Nov 06 '19 03:11 magdalena-klein

I'm pasting the solution found on glitter here, as glitter is not indexed by Internet search engines:

@ponentesincausa said: hi all I fixed it adding wicked_pdf and wkhtmltopdf-binary gems to the Gemfile

I can confirm this solution worked for me too !

cedef avatar Mar 13 '20 09:03 cedef

That worked for me too. This should be added into the install notes, or as a PR to the Gemfile in Decidim.

BurningDog avatar Jun 16 '20 18:06 BurningDog

Actually, it is not really necessary to include it in the Gemfile. The problem is that this should be required in the code in this file https://github.com/decidim/decidim/blob/master/decidim-initiatives/config/initializers/wicked_pdf.rb

I'll make a PR to try to solve it.

Meanwhile, other ways to solve it is to edit the config/environment.rb file for instance, and add it in there:

# Load the Rails application.
require 'wicked_pdf'
require_relative 'application'

# Initialize the Rails application.
Rails.application.initialize!

microstudi avatar Jun 16 '20 18:06 microstudi

Add:

gem 'wicked_pdf'
gem 'wkhtmltopdf-binary'

and voilá

pedregalux avatar Feb 02 '21 19:02 pedregalux