Skip to content

Instantly share code, notes, and snippets.

@adelcambre
Created February 9, 2010 21:54
Show Gist options
  • Select an option

  • Save adelcambre/299715 to your computer and use it in GitHub Desktop.

Select an option

Save adelcambre/299715 to your computer and use it in GitHub Desktop.
if File.exists?("Gemfile")
# We are using bundler
_0_8_bundle_path = "vendor/gems"
if (gemfile = File.read("Gemfile")) =~ /^\s*bundle_path\s+"([^"])\"\s*$/
_0_8_bundle_path = $1
end
if File.exists?(_0_8_bundle_path / "environment.rb")
# we are using 0.8
else
# we are using 0.9
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment