diff options
author | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2011-02-13 09:47:10 +0100 |
---|---|---|
committer | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2011-02-13 09:47:10 +0100 |
commit | faf0db3336f84c744342e9fd071b9387a224bc08 (patch) | |
tree | 6d181a74b7690a03a8ad2846bdc7b9cf924ed9d2 /config/preinitializer.rb | |
parent | afb98e10d6a014ba973611fc1012d4edaba476bc (diff) | |
download | ecs2-faf0db3336f84c744342e9fd071b9387a224bc08.tar.gz ecs2-faf0db3336f84c744342e9fd071b9387a224bc08.zip |
Bundler configuration.
Diffstat (limited to 'config/preinitializer.rb')
-rw-r--r-- | config/preinitializer.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/config/preinitializer.rb b/config/preinitializer.rb new file mode 100644 index 0000000..4491f3a --- /dev/null +++ b/config/preinitializer.rb @@ -0,0 +1,21 @@ +begin + require "rubygems" + require "bundler" +rescue LoadError + raise "Could not load the bundler gem. Install it with `gem install bundler`." +end + +if Gem::Version.new(Bundler::VERSION) <= Gem::Version.new("0.9.24") + raise RuntimeError, "Your bundler version is too old for Rails 2.3." + + "Run `gem install bundler` to upgrade." +end + +begin + # Set up load paths for all bundled gems + ENV["BUNDLE_GEMFILE"] = File.expand_path("../../Gemfile", __FILE__) + Bundler.setup +rescue Bundler::GemNotFound + raise RuntimeError, "Bundler couldn't find some gems." + + "Did you run `bundle install`?" +end + |