簡體   English   中英

將 escpos Ruby gem 與 rails 應用程序一起使用會出現錯誤

[英]Using escpos Ruby gem with rails application gives out error

我試圖在 rails 應用程序中運行以下庫,當我嘗試在我的 controller 中運行他們的示例代碼時,我收到以下錯誤。

在此處輸入圖像描述

我的示例代碼如下,

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

這是我正在嘗試使用的庫。

https://github.com/escpos/escpos

你能試試這個嗎?

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

應該管用!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM