簡體   English   中英

在ruoku上使用ruby 2.0休息-uri

[英]rest-open-uri on heroku with ruby 2.0

由於現在Ruby 2.0的默認編碼為utf-8,因此rest-open-uri gem在heroku上引發以下錯誤:

/app/vendor/bundle/ruby/2.0.0/gems/bundler-1.5.2/lib/bundler/runtime.rb:76:在'require'中:/app/vendor/bundle/ruby/2.0.0/gems /rest-open-uri-1.0.0/lib/rest-open-uri.rb:413:無效的多字節轉義:/ [\\ r \\ n \\ t!#-[]-〜\\ x80- \\ xff] + | (\\ [\\ x00- \\ x7f])/(SyntaxError)

我需要在rest-open-uri.rb中更改以下行。 如何在heroku上訪問此文件?

lib / ruby​​ / gems / 2.0.0 / gems / rest-open-uri-1.0.0 / lib / rest-open-uri.rb

# encoding: US-ASCII

rest-open-uri看起來像是一個失敗的項目。 您是否想打補丁8年的代碼來使您的應用程序正常工作?

看起來rf-rest-open-uri是該項目的最新分支,您是否嘗試過? 我在該gem的rest-open-uri.rb源文件rest-open-uri.rb不到任何encoding指令。

暫無
暫無

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

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