diff options
author | sanemat <o.gata.ken@gmail.com> | 2013-08-31 03:45:11 +0900 |
---|---|---|
committer | sanemat <o.gata.ken@gmail.com> | 2013-08-31 03:45:11 +0900 |
commit | 5851b6fabbe7e0b27f2aa41d9d1b374ca6d4a205 (patch) | |
tree | ff18198083506a2748573baff47749efb50860cf | |
parent | 2ffd162f5be6cd88d32013330b620379f9f325c7 (diff) | |
download | bundler-5851b6fabbe7e0b27f2aa41d9d1b374ca6d4a205.tar.gz |
Guard from load error 'capistrano/version'
-rw-r--r-- | lib/bundler/capistrano.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/bundler/capistrano.rb b/lib/bundler/capistrano.rb index 441a9ad7c9..6baf87a33b 100644 --- a/lib/bundler/capistrano.rb +++ b/lib/bundler/capistrano.rb @@ -3,9 +3,12 @@ # Just add "require 'bundler/capistrano'" in your Capistrano deploy.rb, and # Bundler will be activated after each new deployment. require 'bundler/deployment' -require 'capistrano/version' +begin + require 'capistrano/version' +rescue LoadError +end -if Gem::Version.new(Capistrano::Version).release >= Gem::Version.new("3.0") +if !defined?(Capistrano::Version) || Gem::Version.new(Capistrano::Version).release >= Gem::Version.new("3.0") raise "For Capistrano 3.x integration, please use http://github.com/capistrano/bundler" end |