Eclipse Ruby development tools "require"

I am using Eclipse with RDT to program Ruby. I am trying to include a file in another, but it needs to fail. Both files are in the same directory.

The folder hierarchy is configured as follows:

Project> src> folder> a.rb b.rb

If I try to require b.rb in a.rb, I would use this:

require 'b.rb'

But I get the following error message:

src/folder/a.rb:1:in `require': no such file to load -- b.rb (LoadError)
from src/folder/a.rb:1

If, however, I indicate the full path that it works:

require '/home/peter/workspace/project/src/folder/b.rb'

But obviously, using the full path is a bit silly.

How can i fix this?

+3
source share
1 answer

, ruby ​​ ProcessBuilder ruby, - , , JVM,

"Project > src > folder", , .

+1

Source: https://habr.com/ru/post/1711680/


All Articles