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

Cannot install initiatives and consultations modules #40

Open magdalena-klein opened 5 years ago

magdalena-klein commented 5 years ago

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 commented 5 years ago

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

microstudi commented 5 years ago

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.

magdalena-klein commented 5 years ago

Thanks, i will ask there. I am using 0.19

cedef commented 4 years ago

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 !

BurningDog commented 4 years ago

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

microstudi commented 4 years ago

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!
pedregalux commented 3 years ago

Add:

gem 'wicked_pdf'
gem 'wkhtmltopdf-binary'

and voilá