简体   繁体   English

Rubinius无法识别File类中的方法

[英]Rubinius does not recognize methods in the File class

I have a project that has alot of file manipulation. 我有一个项目有很多文件操作。 I am trying out Rubinius because I need to be able to compile the code. 我正在尝试Rubinius,因为我需要能够编译代码。 When I try to run code that includes 当我尝试运行包含的代码时

if Dir.exist?(file_path)

I get this error: 我收到此错误:

NoMethodError: undefined method `exist?' on Dir (Class)

Is there something I need to include to get this recognized? 有什么我需要包括,以获得这个认可? Btw, I have also tried Dir.exists? 顺便说一句,我也试过Dir.exists? since it is an alias, and that didn't work either. 因为它是别名,而且也不起作用。 Is the issue that this method didn't exist in 1.8.7? 这个方法在1.8.7中不存在的问题是什么? I can't seem to find a list of 我似乎无法找到一份清单

问题是Rubinius正在使用1.8.7,而这种方法当时并不存在。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM