Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Plugins can use a similar bootscript to Rails apps

  • Loading branch information...
commit 882f2da9567b537081bdfa0103e384beb36f8d41 1 parent 987daa7
@josevalim josevalim authored
View
11 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__)
+require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
Please sign in to comment.
Something went wrong with that request. Please try again.