Permalink
Browse files

Update the generated Gemfile and config/boot.rb to work with bundler 0.9

  • Loading branch information...
Carl Lerche
Carl Lerche committed Feb 1, 2010
1 parent 4cbb9db commit a54654de1c9c11d20b4359c4aa01a6dac55aa0cf
@@ -1,4 +1,6 @@
# Edit this Gemfile to bundle your application's dependencies.
+source :gemcutter
+
<% if !dev_or_edge? %>
gem "rails", "<%= Rails::VERSION::STRING %>"
<% end -%>
@@ -1,16 +1,19 @@
# Use Bundler (preferred)
-environment = File.expand_path('../../vendor/gems/environment', __FILE__)
-if File.exist?("#{environment}.rb")
- require environment
-
-# Use 2.x style vendor/rails and RubyGems
-else
- vendor_rails = File.expand_path('../../vendor/rails', __FILE__)
- if File.exist?(vendor_rails)
- Dir["#{vendor_rails}/*/lib"].each { |path| $:.unshift(path) }
- end
-
+begin
+ require File.expand_path('../../vendor/environment', __FILE__)
+rescue LoadError
require 'rubygems'
+ require 'bundler'
+ Bundler.setup
+
+ # To use 2.x style vendor/rails and RubyGems
+ #
+ # vendor_rails = File.expand_path('../../vendor/rails', __FILE__)
+ # if File.exist?(vendor_rails)
+ # Dir["#{vendor_rails}/*/lib"].each { |path| $:.unshift(path) }
+ # end
+ #
+ # require 'rubygems'
end
<% unless options[:skip_activerecord] -%>

0 comments on commit a54654d

Please sign in to comment.