rqrcode-rails3 icon indicating copy to clipboard operation
rqrcode-rails3 copied to clipboard

RQRCode.render_qrcode raises NoMethodError

Open pcraston opened this issue 5 years ago • 3 comments

The RQRcode library has been updated to 1.1.1. Since the gemspec for rqrcode-rails3 is set to s.add_dependency 'rqrcode', '>= 0.4.2' it automatically upgrades rqrcode to the latest version on bundle update.

This breaks the RQRCode.render_qrcodefunction:

NoMethodError: undefined method 'module_count' for #<RQRCode::QRCode:0x000055ce23fb6958>

pcraston avatar Sep 20 '19 10:09 pcraston

FYI you can now just call RQRCode::QRCode.new(code).as_svg

smtlaissezfaire avatar Feb 27 '20 19:02 smtlaissezfaire

I tried to put a pull request in to fix this, but was blocked. In svg.rb change line 18: dimension = (qrcode.modules.countunit) + (2offset) change line 31: next unless qrcode.modules[c][r]

davidabenson avatar Aug 24 '21 17:08 davidabenson

@samvincent Can you please fix this?

doomsayer13 avatar Feb 22 '23 08:02 doomsayer13