diff options
author | José Valim <jose.valim@plataformatec.com.br> | 2013-02-25 19:49:13 -0700 |
---|---|---|
committer | José Valim <jose.valim@plataformatec.com.br> | 2013-02-25 19:49:13 -0700 |
commit | 882f2da9567b537081bdfa0103e384beb36f8d41 (patch) | |
tree | 12839c6471085e1e31a5371abd9585b40450007e /railties | |
parent | 987daa7e783b75ad0a3222ce7faebc1dbd8ad517 (diff) | |
download | rails-882f2da9567b537081bdfa0103e384beb36f8d41.tar.gz rails-882f2da9567b537081bdfa0103e384beb36f8d41.tar.bz2 rails-882f2da9567b537081bdfa0103e384beb36f8d41.zip |
Plugins can use a similar bootscript to Rails apps
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/rails/plugin_new/templates/rails/boot.rb | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/railties/lib/rails/generators/rails/plugin_new/templates/rails/boot.rb b/railties/lib/rails/generators/rails/plugin_new/templates/rails/boot.rb index c78bfb7f63..acb11b9883 100644 --- a/railties/lib/rails/generators/rails/plugin_new/templates/rails/boot.rb +++ b/railties/lib/rails/generators/rails/plugin_new/templates/rails/boot.rb @@ -1,9 +1,4 @@ -gemfile = File.expand_path('../../../../Gemfile', __FILE__) +# Set up gems listed in the Gemfile. +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__) -if File.exist?(gemfile) - ENV['BUNDLE_GEMFILE'] = gemfile - require 'bundler' - Bundler.setup -end - -$:.unshift File.expand_path('../../../../lib', __FILE__)
\ No newline at end of file +require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) |