From ff7a6a9b41937e8bc8e3259af09afe520a19c03e Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Mon, 1 Feb 2010 13:43:17 -0800 Subject: Add the database adapter in the generated Gemfile --- railties/lib/generators/rails/app/templates/Gemfile | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'railties/lib/generators/rails/app/templates') diff --git a/railties/lib/generators/rails/app/templates/Gemfile b/railties/lib/generators/rails/app/templates/Gemfile index 4db2b3e46c..50f1a6a414 100644 --- a/railties/lib/generators/rails/app/templates/Gemfile +++ b/railties/lib/generators/rails/app/templates/Gemfile @@ -13,6 +13,14 @@ gem "rails", "<%= Rails::VERSION::STRING %>" <%= "# " unless options.edge? %>gem "rails", :git => "git://github.com/rails/rails.git" <%- end -%> +<% unless options[:skip_activerecord] -%> +<% if options[:database] == 'sqlite3' -%> +# ActiveRecord requires a database adapter. By default, +# Rails has selected sqlite3. +<% end -%> +gem "<%= gem_for_database %>" +<% end -%> + ## Bundle the gems you use: # gem "bj" # gem "hpricot", "0.6" -- cgit v1.2.3