Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

class method

Gem.try_activate

(::String path) -> bool
try_activate(path)

Try to activate a gem containing path. Returns true if activation succeeded or wasn’t needed because it was already activated. Returns false if it can’t find the path in a gem.

See also .time .ui .target_rbconfig .use_gemdeps also in 4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0