diff options
author | José Valim <jose.valim@gmail.com> | 2010-04-14 00:02:00 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-04-14 00:02:00 +0200 |
commit | c88b9337cf25acf0a765f90c434d134f582864ea (patch) | |
tree | 540e1cd593b267023fd42cc195ef22a728bf5963 /railties/lib/rails | |
parent | bd34df00cf7f9d4d123884095bd82f68c29279ce (diff) | |
download | rails-c88b9337cf25acf0a765f90c434d134f582864ea.tar.gz rails-c88b9337cf25acf0a765f90c434d134f582864ea.tar.bz2 rails-c88b9337cf25acf0a765f90c434d134f582864ea.zip |
Allow a Rails application to be initialized from any directory and not just from inside it (ht: Andre Arko).
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/boot.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/config/boot.rb b/railties/lib/rails/generators/rails/app/templates/config/boot.rb index 712b0981e1..62a8ccc273 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/boot.rb +++ b/railties/lib/rails/generators/rails/app/templates/config/boot.rb @@ -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
\ No newline at end of file |