diff options
Diffstat (limited to 'railties/lib/rails/generators')
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/application.rb | 6 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/boot.rb | 19 |
2 files changed, 10 insertions, 15 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/config/application.rb b/railties/lib/rails/generators/rails/app/templates/config/application.rb index 7ba7c52f9e..bb30136686 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/application.rb +++ b/railties/lib/rails/generators/rails/app/templates/config/application.rb @@ -8,12 +8,6 @@ Rails::Initializer.run do |config| # Add additional load paths for your own custom dirs # config.load_paths += %W( #{root}/extras ) - # Specify gems that this application depends on and have them installed with rake gems:install - # config.gem "bj" - # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net" - # config.gem "sqlite3-ruby", :lib => "sqlite3" - # config.gem "aws-s3", :lib => "aws/s3" - # Only load the plugins named here, in the order given (default is alphabetical). # :all can be used as a placeholder for all plugins not explicitly named # config.plugins = [ :exception_notification, :ssl_requirement, :all ] 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 3165a4091e..5aa49ca5e6 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/boot.rb +++ b/railties/lib/rails/generators/rails/app/templates/config/boot.rb @@ -1,15 +1,16 @@ -# Package management -# Choose one - # Use Bundler (preferred) environment = File.expand_path('../../vendor/gems/environment', __FILE__) -require environment if File.exist?(environment) +if File.exist?("#{environment}.rb") + require environment -# Use 2.x style vendor/rails directory -vendor_rails = File.expand_path('../../vendor/rails', __FILE__) -Dir["#{vendor_rails}/*/lib"].each { |path| $:.unshift(path) } if File.exist?(vendor_rails) +# 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 -# Load Rails from traditional RubyGems -require 'rubygems' + require 'rubygems' +end require 'rails' |