Skip to content

Instantly share code, notes, and snippets.

@i5okie

i5okie/1-error Secret

Created July 24, 2015 19:13
Show Gist options
  • Save i5okie/6d76cddf785c783d1523 to your computer and use it in GitHub Desktop.
Save i5okie/6d76cddf785c783d1523 to your computer and use it in GitHub Desktop.
% ruby app.rb 1 ↵
[ESCPER] [open] ============
[ESCPER] [open] Trying to open Printer 1 USB@/dev/tty.usbserial-AH032WJM@9600bps ...
[ESCPER] [open] Path /dev/tty.usbserial-AH032WJM is not in IP:port format. Not trying to open printer as TCPSocket.
[ESCPER] [open] Failed to open as SerialPort: #<NameError: uninitialized constant Escper::Printer::SerialPort>
require 'escper'
vp1 = Escper::VendorPrinter.new :id => 1, :name => 'Printer 1 USB', :path => '/dev/tty.usbserial-AH032WJM', :copies => 1
pengine = Escper::Printer.new 'local', vp1
pengine.open
pengine.print 1, 'testing print'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment