Can't load required rb

I have defined several Classes in different rb files and put the files into the same directory of the plugin fiiles developed before. I use “require” to import the rbs where need, but they cannot be load. why? Is the Path of the required rb Wrong? Please help me.

Most likely the path is indeed not right. Can you extract and post an example snippet of your Ruby, plus describe the specific details of the directories where you placed your new files and old files?

@MikeXu Mike, see this:

and these templates:

it’s ok. thank you very much.


We do not know since you did not give us an example of your code.

Require paths are relative to the paths that are held in the $LOAD_PATH array, (which can also be referenced as $:).

This topic was automatically closed after 91 days. New replies are no longer allowed.