boot.rb 569 Bytes
Newer Older
danielgrippi's avatar
danielgrippi committed
1
#   Copyright (c) 2010-2011, Diaspora Inc.  This file is
Raphael's avatar
Raphael committed
2
#   licensed under the Affero General Public License version 3 or later.  See
Raphael's avatar
Raphael committed
3
#   the COPYRIGHT file.
4

5 6 7 8 9
if RUBY_VERSION.include?("1.9")
  require 'yaml'
  YAML::ENGINE.yamler= 'syck'
end

10 11 12 13 14 15 16 17 18 19 20 21
require 'rubygems'

# Set up gems listed in the Gemfile.
gemfile = File.expand_path('../../Gemfile', __FILE__)
begin
  ENV['BUNDLE_GEMFILE'] = gemfile
  require 'bundler'
  Bundler.setup
rescue Bundler::GemNotFound => e
  STDERR.puts e.message
  STDERR.puts "Try running `bundle install`."
  exit!
22
end if File.exist?(gemfile)