Open magdalena-klein opened 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
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.
Thanks, i will ask there. I am using 0.19
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 !
That worked for me too. This should be added into the install notes, or as a PR to the Gemfile in Decidim.
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!
Add:
gem 'wicked_pdf'
gem 'wkhtmltopdf-binary'
and voilá
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