繁体   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