Skip to content

Instantly share code, notes, and snippets.

@DAddYE
Created February 18, 2010 12:20
Show Gist options
  • Save DAddYE/307606 to your computer and use it in GitHub Desktop.
Save DAddYE/307606 to your computer and use it in GitHub Desktop.
# 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