AndrewO (owner)

Revisions

gist: 208197 Download_button fork
public
Public Clone URL: git://gist.github.com/208197.git
Embed All Files: show embed
barby_bug_test.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'rubygems'
require 'barby'
require 'prawn'
require 'barby/outputter/prawn_outputter'
 
CODES = %w{1255145144147676 1255147506745571}
 
def write_pdf(code)
  Prawn::Document.generate("#{code}.pdf") do |pdf|
    puts "code: #{code}"
    barcode = Barby::QrCode.new(code)
    barcode.annotate_pdf(pdf)
  end
end
 
CODES.each {|c| write_pdf(c)}
Stacktrace #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/Library/Ruby/Gems/1.8/gems/barby-0.3.1/vendor/rqrcode/lib/rqrcode/qrcode/qr_code.rb:296:in `map_data': undefined method `rszf' for nil:NilClass (NoMethodError)
from /Library/Ruby/Gems/1.8/gems/barby-0.3.1/vendor/rqrcode/lib/rqrcode/qrcode/qr_code.rb:291:in `each'
from /Library/Ruby/Gems/1.8/gems/barby-0.3.1/vendor/rqrcode/lib/rqrcode/qrcode/qr_code.rb:291:in `map_data'
from /Library/Ruby/Gems/1.8/gems/barby-0.3.1/vendor/rqrcode/lib/rqrcode/qrcode/qr_code.rb:287:in `step'
from /Library/Ruby/Gems/1.8/gems/barby-0.3.1/vendor/rqrcode/lib/rqrcode/qrcode/qr_code.rb:287:in `map_data'
from /Library/Ruby/Gems/1.8/gems/barby-0.3.1/vendor/rqrcode/lib/rqrcode/qrcode/qr_code.rb:172:in `make_impl'
from /Library/Ruby/Gems/1.8/gems/barby-0.3.1/vendor/rqrcode/lib/rqrcode/qrcode/qr_code.rb:196:in `get_best_mask_pattern'
from /Library/Ruby/Gems/1.8/gems/barby-0.3.1/vendor/rqrcode/lib/rqrcode/qrcode/qr_code.rb:195:in `each'
from /Library/Ruby/Gems/1.8/gems/barby-0.3.1/vendor/rqrcode/lib/rqrcode/qrcode/qr_code.rb:195:in `get_best_mask_pattern'
from /Library/Ruby/Gems/1.8/gems/barby-0.3.1/vendor/rqrcode/lib/rqrcode/qrcode/qr_code.rb:145:in `make'
from /Library/Ruby/Gems/1.8/gems/barby-0.3.1/vendor/rqrcode/lib/rqrcode/qrcode/qr_code.rb:85:in `initialize'
from /Library/Ruby/Gems/1.8/gems/barby-0.3.1/lib/barby/barcode/qr_code.rb:89:in `new'
from /Library/Ruby/Gems/1.8/gems/barby-0.3.1/lib/barby/barcode/qr_code.rb:89:in `rqrcode'
from /Library/Ruby/Gems/1.8/gems/barby-0.3.1/lib/barby/barcode/qr_code.rb:55:in `encoding'
from /Library/Ruby/Gems/1.8/gems/barby-0.3.1/lib/barby/outputter.rb:81:in `encoding'
from /Library/Ruby/Gems/1.8/gems/barby-0.3.1/lib/barby/outputter.rb:92:in `boolean_groups'
from /Library/Ruby/Gems/1.8/gems/barby-0.3.1/lib/barby/outputter/prawn_outputter.rb:24:in `annotate_pdf'
from /Library/Ruby/Gems/1.8/gems/barby-0.3.1/lib/barby/barcode.rb:70:in `send'
from /Library/Ruby/Gems/1.8/gems/barby-0.3.1/lib/barby/barcode.rb:70:in `method_missing'
from barby_bug_test.rb:20:in `write_pdf'
from /Library/Ruby/Gems/1.8/gems/prawn-core-0.5.1/lib/prawn/document.rb:173:in `[]'
from /Library/Ruby/Gems/1.8/gems/prawn-core-0.5.1/lib/prawn/document.rb:173:in `initialize'
from /Library/Ruby/Gems/1.8/gems/prawn-core-0.5.1/lib/prawn/document.rb:96:in `new'
from /Library/Ruby/Gems/1.8/gems/prawn-core-0.5.1/lib/prawn/document.rb:96:in `generate'
from barby_bug_test.rb:10:in `write_pdf'
from barby_bug_test.rb:24
from barby_bug_test.rb:24:in `each'
from barby_bug_test.rb:24