aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorCarl Lerche <carllerche@mac.com>2010-02-10 23:19:21 -0800
committerCarl Lerche <carllerche@mac.com>2010-02-10 23:19:21 -0800
commit6984aa16c2d6f467f8824f91946e5b0af8935f46 (patch)
treed1e39d25da749187c21363111f7cf0a0bdb4fcc6 /bin
parenteb07f845a4f5c93ceb9c4a0e29ddc432312d391b (diff)
downloadbundler-6984aa16c2d6f467f8824f91946e5b0af8935f46.tar.gz
Have the bundle command explode with a helpful error message if older versions of bundler exist.
Diffstat (limited to 'bin')
-rw-r--r--bin/bundle7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/bundle b/bin/bundle
index ea455093..6fab3004 100644
--- a/bin/bundle
+++ b/bin/bundle
@@ -1,3 +1,10 @@
+# Check if an older version of bundler is installed
+require 'bundler'
+$:.each do |path|
+ if path =~ %r'/bundler-0.(\d+)' && $1.to_i < 9
+ abort "Please remove older versions of bundler. This can by running `gem cleanup`."
+ end
+end
require 'bundler/cli'
begin