简体   繁体   中英

Using escpos Ruby gem with rails application gives out error

I'm trying to run following library inside a rails application and when I try to run their sample code inside my controller, I'm getting the following error.

在此处输入图像描述

My sample code is as following,

      @printer = Escpos::Printer.new
      @printer << "Some text"
      @printer << Escpos::Helpers.bold "help"
      @printer.cut!

This is the library I'm trying to use.

https://github.com/escpos/escpos

Can you try this?

@printer << Escpos::Helpers.bold('help')

Should work!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM