开发者

Two files with the same name pointed by RUBYLIB?

开发者 https://www.devze.com 2022-12-28 02:16 出处:网络
I have two files with the same name开发者_如何学JAVA \"Foo.rb\" in the directories pointed by my RUBYLIB env variable.

I have two files with the same name开发者_如何学JAVA "Foo.rb" in the directories pointed by my RUBYLIB env variable.

This causes the interpreter to fail, when 'require "Foo"' is invoked. It cannot know which to use.

How to solve this without renaming the files ?


What happens if you explicitly specify the path to the file required?

Something like:

require 'lib/the/correct/Foo_folder/Foo'
0

精彩评论

暂无评论...
验证码 换一张
取 消