QRコードを表示したいと想う事は何度かあったのだけれど、Rubyでいい感じのライブラリが見当たらなかったので、しばらく放置してた。 久しぶりにRubyForgeを覗くとrqrcodeというすばらしいものがあるじゃないの。 補足:QRの画像データを作成するバージョンも作ってみた - 参照 ということで早速試してみた。いつもどおり試した環境は以下の通り。 Ruby 1.8.7 P160 Rails 2.1.2 rqrcode 0.3.2 rqrcodeのインストールはドキュメントにあるようにgemで一発 #gem install rqrcode 利用方法もシンプルでQRコードにしたい文字列を放り込むとQR表示用の配列を作り上げる感じ。 require "rubygems" require "rqrcode" @qr = RQRCode::QRCode.new( 'http://d.hatena