Hello Guys I am using rails 3.2.8 and wickedpdf. Its working well in local but not in production.Below is the production logs error. "***************\"/var/www/apps/staging/shared/bundle/ruby/1.9.1/bin/wkhtmltopdf\" -q \"file:///tmp/wicked_pdf_9892_0.html\" \"/tmp/wicked_pdf_generated_file_9892_0.pdf\" ***************" RuntimeError: Failed to execute: "/var/www/apps/staging/shared/bundle/ruby/1.9.1/bin/wkhtmltopdf" -q "file:///tmp/wicked_pdf_9892_0.html" "/tmp/wicked_pdf_generated_file_9892_0.pdf" Error: PDF could not be generated! from /var/www/apps/staging/shared/bundle/ruby/1.9.1/gems/wicked_pdf-0.9.0/lib/wicked_pdf.rb:48:in `rescue in pdf_from_string'' from /var/www/apps/staging/shared/bundle/ruby/1.9.1/gems/wicked_pdf-0.9.0/lib/wicked_pdf.rb:32:in `pdf_from_string'' from /var/www/apps/staging/releases/20130204111108/app/models/message.rb:36:in `create_test_pdf'' from (irb):3 from /var/www/apps/staging/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands/console.rb:47:in `start'' from /var/www/apps/staging/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands/console.rb:8:in `start'' from /var/www/apps/staging/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:41:in `<top (required)>'' from script/rails:6:in `require'' from script/rails:6:in `<main>'' Thank You! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/E255s_exexIJ. For more options, visit https://groups.google.com/groups/opt_out.
On 4 February 2013 14:28, Saravanan P <saravanan.p-tks5Z7IV8F8RmelmmXo44Q@public.gmane.org> wrote:> Hello Guys > I am using rails 3.2.8 and wickedpdf. > Its working well in local but not in production.Below is the production logs > error. > > "***************\"/var/www/apps/staging/shared/bundle/ruby/1.9.1/bin/wkhtmltopdf\" > -q \"file:///tmp/wicked_pdf_9892_0.html\" > \"/tmp/wicked_pdf_generated_file_9892_0.pdf\" ***************" > RuntimeError: Failed to execute: > "/var/www/apps/staging/shared/bundle/ruby/1.9.1/bin/wkhtmltopdf" -qI presume that you have checked that /var/www/apps/staging/shared/bundle/ruby/1.9.1/bin/wkhtmltopdf exists. Or is that the wrong path? Colin> "file:///tmp/wicked_pdf_9892_0.html" > "/tmp/wicked_pdf_generated_file_9892_0.pdf" > Error: PDF could not be generated! > from > /var/www/apps/staging/shared/bundle/ruby/1.9.1/gems/wicked_pdf-0.9.0/lib/wicked_pdf.rb:48:in > `rescue in pdf_from_string'' > from > /var/www/apps/staging/shared/bundle/ruby/1.9.1/gems/wicked_pdf-0.9.0/lib/wicked_pdf.rb:32:in > `pdf_from_string'' > from > /var/www/apps/staging/releases/20130204111108/app/models/message.rb:36:in > `create_test_pdf'' > from (irb):3 > from > /var/www/apps/staging/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands/console.rb:47:in > `start'' > from > /var/www/apps/staging/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands/console.rb:8:in > `start'' > from > /var/www/apps/staging/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:41:in > `<top (required)>'' > from script/rails:6:in `require'' > from script/rails:6:in `<main>'' > > > Thank You! > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-talk/-/E255s_exexIJ. > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Yes Colin Law. The path is wrong. now i corrected under
config/initializers/wicked_pdf.rb
WickedPdf.config = {
:exe_path => ''/usr/local/bin/wkhtmltopdf''
}
Thanks for the reply :)
On Mon, Feb 4, 2013 at 8:42 PM, Colin Law
<clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:
> On 4 February 2013 14:28, Saravanan P
<saravanan.p-tks5Z7IV8F8RmelmmXo44Q@public.gmane.org> wrote:
> > Hello Guys
> > I am using rails 3.2.8 and wickedpdf.
> > Its working well in local but not in production.Below is the
production
> logs
> > error.
> >
> >
>
"***************\"/var/www/apps/staging/shared/bundle/ruby/1.9.1/bin/wkhtmltopdf\"
> > -q \"file:///tmp/wicked_pdf_9892_0.html\"
> > \"/tmp/wicked_pdf_generated_file_9892_0.pdf\"
***************"
> > RuntimeError: Failed to execute:
> >
"/var/www/apps/staging/shared/bundle/ruby/1.9.1/bin/wkhtmltopdf" -q
>
> I presume that you have checked that
> /var/www/apps/staging/shared/bundle/ruby/1.9.1/bin/wkhtmltopdf exists.
> Or is that the wrong path?
>
> Colin
>
> > "file:///tmp/wicked_pdf_9892_0.html"
> > "/tmp/wicked_pdf_generated_file_9892_0.pdf"
> > Error: PDF could not be generated!
> > from
> >
>
/var/www/apps/staging/shared/bundle/ruby/1.9.1/gems/wicked_pdf-0.9.0/lib/wicked_pdf.rb:48:in
> > `rescue in pdf_from_string''
> > from
> >
>
/var/www/apps/staging/shared/bundle/ruby/1.9.1/gems/wicked_pdf-0.9.0/lib/wicked_pdf.rb:32:in
> > `pdf_from_string''
> > from
> >
/var/www/apps/staging/releases/20130204111108/app/models/message.rb:36:in
> > `create_test_pdf''
> > from (irb):3
> > from
> >
>
/var/www/apps/staging/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands/console.rb:47:in
> > `start''
> > from
> >
>
/var/www/apps/staging/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands/console.rb:8:in
> > `start''
> > from
> >
>
/var/www/apps/staging/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:41:in
> > `<top (required)>''
> > from script/rails:6:in `require''
> > from script/rails:6:in `<main>''
> >
> >
> > Thank You!
> >
> > --
> > You received this message because you are subscribed to the Google
Groups
> > "Ruby on Rails: Talk" group.
> > To unsubscribe from this group and stop receiving emails from it, send
an
> > email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To view this discussion on the web visit
> > https://groups.google.com/d/msg/rubyonrails-talk/-/E255s_exexIJ.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
Regards by
Saravanan.P
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Also using the gem ''wkhtmltopdf_binary'' will do the trick. you would no longer need to create config/initializers/wicked_pdf.rb. Regards Vikram Kumar Mishra On Mon, Feb 4, 2013 at 8:53 PM, Saravanan P <saravanan.p-tks5Z7IV8F8RmelmmXo44Q@public.gmane.org>wrote:> Yes Colin Law. The path is wrong. now i corrected under > > config/initializers/wicked_pdf.rb > > WickedPdf.config = { > :exe_path => ''/usr/local/bin/wkhtmltopdf'' > } > > Thanks for the reply :) > > > On Mon, Feb 4, 2013 at 8:42 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > >> On 4 February 2013 14:28, Saravanan P <saravanan.p-tks5Z7IV8F8RmelmmXo44Q@public.gmane.org> wrote: >> > Hello Guys >> > I am using rails 3.2.8 and wickedpdf. >> > Its working well in local but not in production.Below is the production >> logs >> > error. >> > >> > >> "***************\"/var/www/apps/staging/shared/bundle/ruby/1.9.1/bin/wkhtmltopdf\" >> > -q \"file:///tmp/wicked_pdf_9892_0.html\" >> > \"/tmp/wicked_pdf_generated_file_9892_0.pdf\" ***************" >> > RuntimeError: Failed to execute: >> > "/var/www/apps/staging/shared/bundle/ruby/1.9.1/bin/wkhtmltopdf" -q >> >> I presume that you have checked that >> /var/www/apps/staging/shared/bundle/ruby/1.9.1/bin/wkhtmltopdf exists. >> Or is that the wrong path? >> >> Colin >> >> > "file:///tmp/wicked_pdf_9892_0.html" >> > "/tmp/wicked_pdf_generated_file_9892_0.pdf" >> > Error: PDF could not be generated! >> > from >> > >> /var/www/apps/staging/shared/bundle/ruby/1.9.1/gems/wicked_pdf-0.9.0/lib/wicked_pdf.rb:48:in >> > `rescue in pdf_from_string'' >> > from >> > >> /var/www/apps/staging/shared/bundle/ruby/1.9.1/gems/wicked_pdf-0.9.0/lib/wicked_pdf.rb:32:in >> > `pdf_from_string'' >> > from >> > >> /var/www/apps/staging/releases/20130204111108/app/models/message.rb:36:in >> > `create_test_pdf'' >> > from (irb):3 >> > from >> > >> /var/www/apps/staging/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands/console.rb:47:in >> > `start'' >> > from >> > >> /var/www/apps/staging/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands/console.rb:8:in >> > `start'' >> > from >> > >> /var/www/apps/staging/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:41:in >> > `<top (required)>'' >> > from script/rails:6:in `require'' >> > from script/rails:6:in `<main>'' >> > >> > >> > Thank You! >> > >> > -- >> > You received this message because you are subscribed to the Google >> Groups >> > "Ruby on Rails: Talk" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> an >> > email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> > To view this discussion on the web visit >> > https://groups.google.com/d/msg/rubyonrails-talk/-/E255s_exexIJ. >> > For more options, visit https://groups.google.com/groups/opt_out. >> > >> > >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > > -- > Regards by > Saravanan.P > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > >-- *Thanks and Regards Vikram Kumar Mishra* *Software Engineer, Mindfire Solutions* -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.