Error while using "Rotate"

17 views
Skip to first unread message

Audio Media Assit

unread,
Jul 31, 2019, 6:12:52 AM7/31/19
to Prawn
Hi, 
I have a web application with Ruby on Rails 

Rails 5.2.3, Ruby 2.5.5p157

I need to generate PDF document. 

Whenever I try to rotate on the pdf, i get this error

undefined method `has_key?' for -129.6832654823495:Float


even with the code in the manual like:
fill_circle [250, 200], 2
12.times do |i|
rotate(i * 30.0, :origin => [250, 200]) do
stroke_rectangle [350, 225], 100, 50
draw_text "Rotated #{i * 30}°", :size => 10, :at => [360, 205]
end
end

the value changes linked with the angle.. but I don't know what to do and I need it!!!


Actually, i'm refactoring a old app, made with rail3.0 and Prawn 0.xx and it was working like a charm, now I struggle with your new version

Please help!!!

Alexander Mankuta

unread,
Jul 31, 2019, 6:14:43 AM7/31/19
to Prawn
A backtrace would help diagnosing your issue.

Audio Media Assit

unread,
Aug 9, 2019, 8:47:14 AM8/9/19
to Prawn
Hello
Sorry, didn't have much time until now. 
I'm not still very familiar with the debugger... I hope this is the backtrace you need (cf file attached)
If not, can you specify?

thanks in advance!!
prawn_bug_backtrace.txt

Audio Media Assit

unread,
Aug 22, 2019, 2:13:57 AM8/22/19
to Prawn
Nobody?

--
You received this message because you are subscribed to the Google Groups "Prawn" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prawn-ruby+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prawn-ruby/998fd699-26dc-464f-8797-9f9356d9033c%40googlegroups.com.

Audio Media Assit

unread,
Aug 23, 2019, 11:19:22 AM8/23/19
to Prawn
I found it... 
I inserted this
  include ActionView::Helpers::TranslationHelper
It seems I don't need it and it made the error... sorry!!

Case Closed!

--
You received this message because you are subscribed to the Google Groups "Prawn" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prawn-ruby+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages