Gem.bin_path(\'cucumber\', \'cucumber\')
Will return the binary/executable\'s path. It seems there is no such function to return the library path.
Try using bundle show cucumber.
bundle show cucumber
Which, from looking at the source of bundler does something like:
spec = Bundler.load.specs.find{|s| s.name == name } spec.full_gem_path
You are using bundler, right?