Rubinius 无法识别 File 类中的方法
我有一个需要大量文件操作的项目。我正在尝试 Rubinius,因为我需要能够编译代码。当我尝试运行包含以下内容的代码时
if Dir.exist?(file_path)
,出现此错误:
NoMethodError: undefined method `exist?' on Dir (Class)
是否需要包含某些内容才能识别此内容?顺便说一句,我也尝试过 Dir.exists?因为它是一个别名,这也不起作用。问题是1.8.7中没有这个方法吗?我似乎找不到列表
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. 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? since it is an alias, and that didn't work either. Is the issue that this method didn't exist in 1.8.7? I can't seem to find a list of
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题是 Rubinius 使用的是 1.8.7,而这个方法当时还不存在。
The issue was that Rubinius is using 1.8.7 and this method didn't exist then.