Allow a Rails application to be initialized from any directory and not just from inside it (ht: Andre Arko).

This commit is contained in:
José Valim 2010-04-14 00:02:00 +02:00
parent bd34df00cf
commit c88b9337cf
1 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,9 @@
require 'rubygems'
# Set up gems listed in the Gemfile.
if File.exist?(File.expand_path('../../Gemfile', __FILE__))
gemfile = File.expand_path('../../Gemfile', __FILE__)
if File.exist?(gemfile)
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'
Bundler.setup
end
end