title: How to generate code_128 barcode for string with Barby
body: <p>I'm currently using Barby gem with wrapper gem has_barcode to generate a bar code for a string I have : j5xvvcz.</p>
  
  <p>Gemfile gems (mostly for those who are new to this solution)</p>
  
  <pre><code>#for barcode generation
  gem "barby", "~&gt; 0.5.0"
  gem "has_barcode", "~&gt; 0.2.0"
  gem "rqrcode", "~&gt; 0.4.2" #for qr code support
  </code></pre>
  
  <p>Code i have in my model</p>
  
  <pre><code>include HasBarcode
  
  has_barcode :barcode,
              :outputter =&gt; :svg,
              :type =&gt; :code_93,
              :value =&gt; Proc.new { |p| "#{p.number}" }
  </code></pre>
  
  <p>Where i render it to screen:</p>
  
     
  
  <p>If I try to generate a qr_code or a code_93, it all works, but nor code_128 or code_39 work, getting a <strong>data not valid</strong> message.
  My worries is that code_93 won't get recognized in some devices since it seems it is not so widely adopted (from what i read <a href="http://www.makebarcode.com/specs/speclist.html" rel="nofollow">here</a> 128 would be the best solution for this)</p>
  
  <p>This seems to be something i might be doing wrong, since the code is valid for code_128 aparently as i tested it <a href="http://www.racoindustries.com/barcodegenerator/1d/code-128.aspx" rel="nofollow">here</a>.</p>
  
  <p>Anyone knows what might be wrong with my approach?</p>