Can't load required rb


#1

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.


#2

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?


#3

@MikeXu Mike, see this:

https://extensions.sketchup.com/en/developer_center/ew_developer#rbz

and these templates:


#4

it’s ok. thank you very much.


#5

REF: http://ruby-doc.org/core-2.2.4/Kernel.html#method-i-require

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 $:).


#6

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