Ruby can't find the method capture2e from open3 module

╄→гoц情女王★ 提交于 2019-12-12 03:06:13

问题


I am trying to use the script blogger.rb and I just can't get it work. It keeps giving me the error :

blogger.rb:294:in text2html': undefined methodcapture2' for Open3:Module (NoMethodError)

The script does a require Open3 in the beginning. I don't understand where is the problem ! I have no knowledge of Ruby. However, I can intelligently read and edit codes in general.


回答1:


I'd guess that you're using Ruby 1.8 but the script requires 1.9. The Open3 class in 1.8.7 has a popen3 class method and nothing else. The Ruby 1.9 Open3 has the capture2 and capture2e class methods that you're looking for. So you need to upgrade your Ruby to 1.9 or find another script.



来源:https://stackoverflow.com/questions/7587641/ruby-cant-find-the-method-capture2e-from-open3-module

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!