Skip to content

Instantly share code, notes, and snippets.

class Hash
def lookup_by_range(num)
self.find {|range, v| range.include?(num) }.last
end
end
rvm_path = "#{deployment_user_home_directory}/.rvm"
rvm_version = "ruby-1.9.2-p0" # Find this in ~/.rvm/rubies/
set :default_environment, {
"PATH" => %W[
#{rvm_path}/gems/#{rvm_version}/bin
#{rvm_path}/gems/#{rvm_version}@global/bin
#{rvm_path}/rubies/#{rvm_version}/bin
#{rvm_path}/bin
$PATH
].join(":"),