Skip to content

Instantly share code, notes, and snippets.

@kwilczynski
Created November 30, 2011 19:58
Show Gist options
  • Save kwilczynski/1410548 to your computer and use it in GitHub Desktop.
Save kwilczynski/1410548 to your computer and use it in GitHub Desktop.
Fact to expose Ruby binary location
#
# ruby_binary.rb
#
require 'facter'
if Facter.value(:kernel) == 'Linux'
Facter.add('rubybinary') do
confine :kernel => :linux
setcode do
config = Config::CONFIG
File.join(config['bindir'], config['ruby_install_name'])
end
end
end
# vim: set ts=2 sw=2 et :
# encoding: utf-8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment