Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

Gem::BasicSpecification#require_paths

require_paths

Paths in the gem to add to $LOAD_PATH when this gem is activated.

See also require_paths=

If you have an extension you do not need to add "ext" to the require path, the extension build process will copy the extension files into “lib” for you.

The default value is "lib"

Usage:

Example
# If all library files are in the root directory...
spec.require_path = '.'
See also #plugins #source_paths #platform #stubbed? also in 4.1 · 4.0 · 3.4 · 3.2 · 3.1 · 3.0