Skip to content

Instantly share code, notes, and snippets.

@bradediger
Created February 5, 2009 19:50
Show Gist options
  • Save bradediger/58955 to your computer and use it in GitHub Desktop.
Save bradediger/58955 to your computer and use it in GitHub Desktop.
/usr/local/lib/ruby/gems/1.8/gems/prawn-0.4.0/lib/prawn/document/internals.rb:44:in `proc_set': undefined method `data' for nil:NilClass (NoMethodError)
from /usr/local/lib/ruby/gems/1.8/gems/prawn-0.4.0/lib/prawn/font.rb:203:in `initialize'
from /usr/local/lib/ruby/gems/1.8/gems/prawn-0.4.0/lib/prawn/font/afm.rb:30:in `initialize'
from /usr/local/lib/ruby/gems/1.8/gems/prawn-0.4.0/lib/prawn/font.rb:192:in `new'
from /usr/local/lib/ruby/gems/1.8/gems/prawn-0.4.0/lib/prawn/font.rb:192:in `load'
from /usr/local/lib/ruby/gems/1.8/gems/prawn-0.4.0/lib/prawn/font.rb:125:in `find_font'
from /usr/local/lib/ruby/gems/1.8/gems/prawn-0.4.0/lib/prawn/font.rb:33:in `font'
from font_test.rb:4
from /usr/local/lib/ruby/gems/1.8/gems/prawn-0.4.0/lib/prawn/document.rb:115:in `instance_eval'
from /usr/local/lib/ruby/gems/1.8/gems/prawn-0.4.0/lib/prawn/document.rb:115:in `initialize'
from /usr/local/lib/ruby/gems/1.8/gems/prawn-0.4.0/lib/prawn/document.rb:58:in `new'
from /usr/local/lib/ruby/gems/1.8/gems/prawn-0.4.0/lib/prawn/document.rb:58:in `generate'
from font_test.rb:3
require 'prawn'
Prawn::Document.generate('font_test.pdf', :skip_page_creation => true) do
font "Helvetica", :style => :bold
start_new_page
text "This should be bold"
end
@shineforyou
Copy link

this is so weird. if you don't use :skip_page_creation, it works fine.

@bradediger
Copy link
Author

Prawn 0.4 is extremely old. If you're still experiencing this problem on newer versions of Prawn, please file a bug and we'll look into it.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment