Created
February 18, 2010 12:20
-
-
Save DAddYE/307606 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Defines our constants | |
PADRINO_ENV = ENV["PADRINO_ENV"] ||= ENV["RACK_ENV"] ||= "development" unless defined?(PADRINO_ENV) | |
PADRINO_ROOT = File.dirname(__FILE__) + '/..' unless defined? PADRINO_ROOT | |
begin | |
# Require the preresolved locked set of gems. | |
require File.expand_path('../../.bundle/environment', __FILE__) | |
rescue LoadError | |
# Fallback on doing the resolve at runtime. | |
require 'rubygems' | |
+ gem 'bundler', '0.9.5' | |
require 'bundler' | |
Bundler.setup(:default, PADRINO_ENV) | |
end | |
Bundler.require(:default, PADRINO_ENV) | |
puts "=> Located #{Padrino.bundle} Gemfile for #{Padrino.env}" | |
Padrino.load! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment