From a50284d28f872725ca8d24f4eac55b00c6c56641 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 16 Dec 2007 23:22:56 +0000 Subject: [PATCH] Changed the default database from mysql to sqlite3, so now running "rails myapp" will have a config/database.yml thats setup for SQLite3 (which in OS X Leopard is installed by default, so is the gem, so everything Just Works with no database configuration at all). To get a Rails application preconfigured for MySQL, just run "rails -d mysql myapp" [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8417 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/CHANGELOG | 2 ++ .../generators/applications/app/app_generator.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 96f90abd485..1a74229cf44 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Changed the default database from mysql to sqlite3, so now running "rails myapp" will have a config/database.yml that's setup for SQLite3 (which in OS X Leopard is installed by default, so is the gem, so everything Just Works with no database configuration at all). To get a Rails application preconfigured for MySQL, just run "rails -d mysql myapp" [DHH] + * Turned on ActionView::Base.cache_template_loading by default in config/environments/production.rb to prevent file system stat calls for every template loading to see if it changed (this means that you have to restart the application to see template changes in production mode) [DHH] * Introduce `rake secret` to output a crytographically secure secret key for use with cookie sessions #xxxx [update from Trac] diff --git a/railties/lib/rails_generator/generators/applications/app/app_generator.rb b/railties/lib/rails_generator/generators/applications/app/app_generator.rb index 915b15317f9..1dd72f349aa 100644 --- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb +++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb @@ -8,7 +8,7 @@ class AppGenerator < Rails::Generator::Base DATABASES = %w(mysql oracle postgresql sqlite2 sqlite3 frontbase) - default_options :db => (ENV["RAILS_DEFAULT_DATABASE"] || "mysql"), + default_options :db => (ENV["RAILS_DEFAULT_DATABASE"] || "sqlite3"), :shebang => DEFAULT_SHEBANG, :freeze => false mandatory_options :source => "#{File.dirname(__FILE__)}/../../../../.."