如何在Ruby on Rails中读取远程文件的内容? [英] How to read content of remote file in Ruby on Rails?
本文介绍了如何在Ruby on Rails中读取远程文件的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这里是我的文件: http://example.com/test.txt
我必须阅读 http://example.com/test.txt 的内容(JSON字符串)并用Ruby解析
i have to read content of http://example.com/test.txt (a JSON string) and parse it in Ruby
推荐答案
我建议使用 查看全文