aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/generators/rails/app/templates/config
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-01-18 13:44:32 +0100
committerJosé Valim <jose.valim@gmail.com>2010-01-18 16:21:11 +0100
commit9fffdc5cdb80b1824473a6d7ae1fedf9e74aa748 (patch)
tree88f429511bf65f1104efeab10d6310b68ab24837 /railties/lib/generators/rails/app/templates/config
parente75ea474346e74e36d92febd47985c3571b1472b (diff)
downloadrails-9fffdc5cdb80b1824473a6d7ae1fedf9e74aa748.tar.gz
rails-9fffdc5cdb80b1824473a6d7ae1fedf9e74aa748.tar.bz2
rails-9fffdc5cdb80b1824473a6d7ae1fedf9e74aa748.zip
Generators load path now will be Ruby load path. If you want to use rspec:install generator, you need generators/rspec/install_generator in your load path.
Diffstat (limited to 'railties/lib/generators/rails/app/templates/config')
-rw-r--r--railties/lib/generators/rails/app/templates/config/application.rb34
-rw-r--r--railties/lib/generators/rails/app/templates/config/boot.rb36
-rw-r--r--railties/lib/generators/rails/app/templates/config/databases/frontbase.yml28
-rw-r--r--railties/lib/generators/rails/app/templates/config/databases/ibm_db.yml62
-rw-r--r--railties/lib/generators/rails/app/templates/config/databases/mysql.yml60
-rw-r--r--railties/lib/generators/rails/app/templates/config/databases/oracle.yml39
-rw-r--r--railties/lib/generators/rails/app/templates/config/databases/postgresql.yml51
-rw-r--r--railties/lib/generators/rails/app/templates/config/databases/sqlite3.yml22
-rw-r--r--railties/lib/generators/rails/app/templates/config/environment.rb5
-rw-r--r--railties/lib/generators/rails/app/templates/config/environments/development.rb.tt19
-rw-r--r--railties/lib/generators/rails/app/templates/config/environments/production.rb.tt33
-rw-r--r--railties/lib/generators/rails/app/templates/config/environments/test.rb.tt29
-rw-r--r--railties/lib/generators/rails/app/templates/config/initializers/backtrace_silencers.rb7
-rw-r--r--railties/lib/generators/rails/app/templates/config/initializers/cookie_verification_secret.rb.tt7
-rw-r--r--railties/lib/generators/rails/app/templates/config/initializers/inflections.rb10
-rw-r--r--railties/lib/generators/rails/app/templates/config/initializers/mime_types.rb5
-rw-r--r--railties/lib/generators/rails/app/templates/config/initializers/session_store.rb.tt15
-rw-r--r--railties/lib/generators/rails/app/templates/config/locales/en.yml5
-rw-r--r--railties/lib/generators/rails/app/templates/config/routes.rb58
19 files changed, 525 insertions, 0 deletions
diff --git a/railties/lib/generators/rails/app/templates/config/application.rb b/railties/lib/generators/rails/app/templates/config/application.rb
new file mode 100644
index 0000000000..334820826f
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/application.rb
@@ -0,0 +1,34 @@
+require File.expand_path('../boot', __FILE__)
+
+module <%= app_const_base %>
+ class Application < Rails::Application
+ # Settings in config/environments/* take precedence over those specified here.
+ # Application configuration should go into files in config/initializers
+ # -- all .rb files in that directory are automatically loaded.
+
+ # Add additional load paths for your own custom dirs
+ # config.load_paths += %W( #{config.root}/extras )
+
+ # 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 ]
+
+ # Activate observers that should always be running
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
+
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
+ # config.time_zone = 'Central Time (US & Canada)'
+
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
+ # config.i18n.default_locale = :de
+
+ # Configure generators values. Many other options are available, be sure to check the documentation.
+ # config.generators do |g|
+ # g.orm :active_record
+ # g.template_engine :erb
+ # g.test_framework :test_unit, :fixture => true
+ # end
+ end
+end
diff --git a/railties/lib/generators/rails/app/templates/config/boot.rb b/railties/lib/generators/rails/app/templates/config/boot.rb
new file mode 100644
index 0000000000..466e1e50ec
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/boot.rb
@@ -0,0 +1,36 @@
+# 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
+
+ require 'rubygems'
+end
+
+<% unless options[:skip_activerecord] -%>
+require 'rails/all'
+
+# To pick the frameworks you want, remove 'require "rails/all"'
+# and list the framework railties that you want:
+#
+# require "active_model/railtie"
+# require "active_record/railtie"
+# require "action_controller/railtie"
+# require "action_view/railtie"
+# require "action_mailer/railtie"
+# require "active_resource/railtie"
+<% else -%>
+# Pick the frameworks you want:
+# require "active_record/railtie"
+require "active_model/railtie"
+require "action_controller/railtie"
+require "action_view/railtie"
+require "action_mailer/railtie"
+require "active_resource/railtie"
+<% end -%> \ No newline at end of file
diff --git a/railties/lib/generators/rails/app/templates/config/databases/frontbase.yml b/railties/lib/generators/rails/app/templates/config/databases/frontbase.yml
new file mode 100644
index 0000000000..c0c3588be1
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/databases/frontbase.yml
@@ -0,0 +1,28 @@
+# FrontBase versions 4.x
+#
+# Get the bindings:
+# gem install ruby-frontbase
+
+development:
+ adapter: frontbase
+ host: localhost
+ database: <%= app_name %>_development
+ username: <%= app_name %>
+ password: ''
+
+# Warning: The database defined as "test" will be erased and
+# re-generated from your development database when you run "rake".
+# Do not set this db to the same as development or production.
+test:
+ adapter: frontbase
+ host: localhost
+ database: <%= app_name %>_test
+ username: <%= app_name %>
+ password: ''
+
+production:
+ adapter: frontbase
+ host: localhost
+ database: <%= app_name %>_production
+ username: <%= app_name %>
+ password: ''
diff --git a/railties/lib/generators/rails/app/templates/config/databases/ibm_db.yml b/railties/lib/generators/rails/app/templates/config/databases/ibm_db.yml
new file mode 100644
index 0000000000..a9716ddb44
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/databases/ibm_db.yml
@@ -0,0 +1,62 @@
+# IBM Dataservers
+#
+# Home Page
+# http://rubyforge.org/projects/rubyibm/
+#
+# To install the ibm_db gem:
+# On Linux:
+# Source the db2profile file and set the necessary environment variables:
+#
+# . /home/db2inst1/sqllib/db2profile
+# export IBM_DB_DIR=/opt/ibm/db2/V9.1
+# export IBM_DB_LIB=/opt/ibm/db2/V9.1/lib32
+#
+# Then issue the command: gem install ibm_db
+#
+# On Windows:
+# Issue the command: gem install ibm_db
+# If prompted, select the mswin32 option
+#
+# For more details on the installation refer to http://rubyforge.org/docman/view.php/2361/7682/IBM_DB_GEM.pdf
+#
+# For more details on the connection parameters below refer to:
+# http://rubyibm.rubyforge.org/docs/adapter/0.9.0/rdoc/classes/ActiveRecord/ConnectionAdapters/IBM_DBAdapter.html
+
+development:
+ adapter: ibm_db
+ username: db2inst1
+ password:
+ database: <%= app_name[0,4] %>_dev
+ #schema: db2inst1
+ #host: localhost
+ #port: 50000
+ #account: my_account
+ #app_user: my_app_user
+ #application: my_application
+ #workstation: my_workstation
+
+test:
+ adapter: ibm_db
+ username: db2inst1
+ password:
+ database: <%= app_name[0,4] %>_tst
+ #schema: db2inst1
+ #host: localhost
+ #port: 50000
+ #account: my_account
+ #app_user: my_app_user
+ #application: my_application
+ #workstation: my_workstation
+
+production:
+ adapter: ibm_db
+ username: db2inst1
+ password:
+ database: <%= app_name[0,4] %>_prd
+ #schema: db2inst1
+ #host: localhost
+ #port: 50000
+ #account: my_account
+ #app_user: my_app_user
+ #application: my_application
+ #workstation: my_workstation \ No newline at end of file
diff --git a/railties/lib/generators/rails/app/templates/config/databases/mysql.yml b/railties/lib/generators/rails/app/templates/config/databases/mysql.yml
new file mode 100644
index 0000000000..6bf2f7b1fd
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/databases/mysql.yml
@@ -0,0 +1,60 @@
+# MySQL. Versions 4.1 and 5.0 are recommended.
+#
+# Install the MySQL driver:
+# gem install mysql
+# On Mac OS X:
+# sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
+# On Mac OS X Leopard:
+# sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
+# This sets the ARCHFLAGS environment variable to your native architecture
+# On Windows:
+# gem install mysql
+# Choose the win32 build.
+# Install MySQL and put its /bin directory on your path.
+#
+# And be sure to use new-style password hashing:
+# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
+development:
+ adapter: mysql
+ encoding: utf8
+ reconnect: false
+ database: <%= app_name %>_development
+ pool: 5
+ username: root
+ password:
+<% if mysql_socket -%>
+ socket: <%= mysql_socket %>
+<% else -%>
+ host: localhost
+<% end -%>
+
+# Warning: The database defined as "test" will be erased and
+# re-generated from your development database when you run "rake".
+# Do not set this db to the same as development or production.
+test:
+ adapter: mysql
+ encoding: utf8
+ reconnect: false
+ database: <%= app_name %>_test
+ pool: 5
+ username: root
+ password:
+<% if mysql_socket -%>
+ socket: <%= mysql_socket %>
+<% else -%>
+ host: localhost
+<% end -%>
+
+production:
+ adapter: mysql
+ encoding: utf8
+ reconnect: false
+ database: <%= app_name %>_production
+ pool: 5
+ username: root
+ password:
+<% if mysql_socket -%>
+ socket: <%= mysql_socket %>
+<% else -%>
+ host: localhost
+<% end -%>
diff --git a/railties/lib/generators/rails/app/templates/config/databases/oracle.yml b/railties/lib/generators/rails/app/templates/config/databases/oracle.yml
new file mode 100644
index 0000000000..a1883f6256
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/databases/oracle.yml
@@ -0,0 +1,39 @@
+# Oracle/OCI 8i, 9, 10g
+#
+# Requires Ruby/OCI8:
+# http://rubyforge.org/projects/ruby-oci8/
+#
+# Specify your database using any valid connection syntax, such as a
+# tnsnames.ora service name, or a SQL connect url string of the form:
+#
+# //host:[port][/service name]
+#
+# By default prefetch_rows (OCI_ATTR_PREFETCH_ROWS) is set to 100. And
+# until true bind variables are supported, cursor_sharing is set by default
+# to 'similar'. Both can be changed in the configation below; the defaults
+# are equivalent to specifying:
+#
+# prefetch_rows: 100
+# cursor_sharing: similar
+#
+
+development:
+ adapter: oracle
+ database: <%= app_name %>_development
+ username: <%= app_name %>
+ password:
+
+# Warning: The database defined as "test" will be erased and
+# re-generated from your development database when you run "rake".
+# Do not set this db to the same as development or production.
+test:
+ adapter: oracle
+ database: <%= app_name %>_test
+ username: <%= app_name %>
+ password:
+
+production:
+ adapter: oracle
+ database: <%= app_name %>_production
+ username: <%= app_name %>
+ password:
diff --git a/railties/lib/generators/rails/app/templates/config/databases/postgresql.yml b/railties/lib/generators/rails/app/templates/config/databases/postgresql.yml
new file mode 100644
index 0000000000..f600e054cf
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/databases/postgresql.yml
@@ -0,0 +1,51 @@
+# PostgreSQL. Versions 7.4 and 8.x are supported.
+#
+# Install the ruby-postgres driver:
+# gem install ruby-postgres
+# On Mac OS X:
+# gem install ruby-postgres -- --include=/usr/local/pgsql
+# On Windows:
+# gem install ruby-postgres
+# Choose the win32 build.
+# Install PostgreSQL and put its /bin directory on your path.
+development:
+ adapter: postgresql
+ encoding: unicode
+ database: <%= app_name %>_development
+ pool: 5
+ username: <%= app_name %>
+ password:
+
+ # Connect on a TCP socket. Omitted by default since the client uses a
+ # domain socket that doesn't need configuration. Windows does not have
+ # domain sockets, so uncomment these lines.
+ #host: localhost
+ #port: 5432
+
+ # Schema search path. The server defaults to $user,public
+ #schema_search_path: myapp,sharedapp,public
+
+ # Minimum log levels, in increasing order:
+ # debug5, debug4, debug3, debug2, debug1,
+ # log, notice, warning, error, fatal, and panic
+ # The server defaults to notice.
+ #min_messages: warning
+
+# Warning: The database defined as "test" will be erased and
+# re-generated from your development database when you run "rake".
+# Do not set this db to the same as development or production.
+test:
+ adapter: postgresql
+ encoding: unicode
+ database: <%= app_name %>_test
+ pool: 5
+ username: <%= app_name %>
+ password:
+
+production:
+ adapter: postgresql
+ encoding: unicode
+ database: <%= app_name %>_production
+ pool: 5
+ username: <%= app_name %>
+ password:
diff --git a/railties/lib/generators/rails/app/templates/config/databases/sqlite3.yml b/railties/lib/generators/rails/app/templates/config/databases/sqlite3.yml
new file mode 100644
index 0000000000..025d62a8d8
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/databases/sqlite3.yml
@@ -0,0 +1,22 @@
+# SQLite version 3.x
+# gem install sqlite3-ruby (not necessary on OS X Leopard)
+development:
+ adapter: sqlite3
+ database: db/development.sqlite3
+ pool: 5
+ timeout: 5000
+
+# Warning: The database defined as "test" will be erased and
+# re-generated from your development database when you run "rake".
+# Do not set this db to the same as development or production.
+test:
+ adapter: sqlite3
+ database: db/test.sqlite3
+ pool: 5
+ timeout: 5000
+
+production:
+ adapter: sqlite3
+ database: db/production.sqlite3
+ pool: 5
+ timeout: 5000
diff --git a/railties/lib/generators/rails/app/templates/config/environment.rb b/railties/lib/generators/rails/app/templates/config/environment.rb
new file mode 100644
index 0000000000..1684986a59
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/environment.rb
@@ -0,0 +1,5 @@
+# Load the rails application
+require File.expand_path('../application', __FILE__)
+
+# Initialize the rails application
+<%= app_const %>.initialize!
diff --git a/railties/lib/generators/rails/app/templates/config/environments/development.rb.tt b/railties/lib/generators/rails/app/templates/config/environments/development.rb.tt
new file mode 100644
index 0000000000..b10103b436
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/environments/development.rb.tt
@@ -0,0 +1,19 @@
+<%= app_const %>.configure do
+ # Settings specified here will take precedence over those in config/environment.rb
+
+ # In the development environment your application's code is reloaded on
+ # every request. This slows down response time but is perfect for development
+ # since you don't have to restart the webserver when you make code changes.
+ config.cache_classes = false
+
+ # Log error messages when you accidentally call methods on nil.
+ config.whiny_nils = true
+
+ # Show full error reports and disable caching
+ config.action_controller.consider_all_requests_local = true
+ config.action_view.debug_rjs = true
+ config.action_controller.perform_caching = false
+
+ # Don't care if the mailer can't send
+ config.action_mailer.raise_delivery_errors = false
+end \ No newline at end of file
diff --git a/railties/lib/generators/rails/app/templates/config/environments/production.rb.tt b/railties/lib/generators/rails/app/templates/config/environments/production.rb.tt
new file mode 100644
index 0000000000..543a40108c
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/environments/production.rb.tt
@@ -0,0 +1,33 @@
+<%= app_const %>.configure do
+ # Settings specified here will take precedence over those in config/environment.rb
+
+ # The production environment is meant for finished, "live" apps.
+ # Code is not reloaded between requests
+ config.cache_classes = true
+
+ # Full error reports are disabled and caching is turned on
+ config.action_controller.consider_all_requests_local = false
+ config.action_controller.perform_caching = true
+
+ # See everything in the log (default is :info)
+ # config.log_level = :debug
+
+ # Use a different logger for distributed setups
+ # config.logger = SyslogLogger.new
+
+ # Use a different cache store in production
+ # config.cache_store = :mem_cache_store
+
+ # Disable Rails's static asset server
+ # In production, Apache or nginx will already do this
+ config.serve_static_assets = false
+
+ # Enable serving of images, stylesheets, and javascripts from an asset server
+ # config.action_controller.asset_host = "http://assets.example.com"
+
+ # Disable delivery errors, bad email addresses will be ignored
+ # config.action_mailer.raise_delivery_errors = false
+
+ # Enable threaded mode
+ # config.threadsafe!
+end \ No newline at end of file
diff --git a/railties/lib/generators/rails/app/templates/config/environments/test.rb.tt b/railties/lib/generators/rails/app/templates/config/environments/test.rb.tt
new file mode 100644
index 0000000000..428fa35633
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/environments/test.rb.tt
@@ -0,0 +1,29 @@
+<%= app_const %>.configure do
+ # Settings specified here will take precedence over those in config/environment.rb
+
+ # The test environment is used exclusively to run your application's
+ # test suite. You never need to work with it otherwise. Remember that
+ # your test database is "scratch space" for the test suite and is wiped
+ # and recreated between test runs. Don't rely on the data there!
+ config.cache_classes = true
+
+ # Log error messages when you accidentally call methods on nil.
+ config.whiny_nils = true
+
+ # Show full error reports and disable caching
+ config.action_controller.consider_all_requests_local = true
+ config.action_controller.perform_caching = false
+
+ # Disable request forgery protection in test environment
+ config.action_controller.allow_forgery_protection = false
+
+ # Tell Action Mailer not to deliver emails to the real world.
+ # The :test delivery method accumulates sent emails in the
+ # ActionMailer::Base.deliveries array.
+ config.action_mailer.delivery_method = :test
+
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
+ # like if you have constraints or database-specific column types
+ # config.active_record.schema_format = :sql
+end \ No newline at end of file
diff --git a/railties/lib/generators/rails/app/templates/config/initializers/backtrace_silencers.rb b/railties/lib/generators/rails/app/templates/config/initializers/backtrace_silencers.rb
new file mode 100644
index 0000000000..839d4cde19
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/initializers/backtrace_silencers.rb
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
+# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
+
+# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
+# Rails.backtrace_cleaner.remove_silencers! \ No newline at end of file
diff --git a/railties/lib/generators/rails/app/templates/config/initializers/cookie_verification_secret.rb.tt b/railties/lib/generators/rails/app/templates/config/initializers/cookie_verification_secret.rb.tt
new file mode 100644
index 0000000000..451dbe1d1c
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/initializers/cookie_verification_secret.rb.tt
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# Your secret key for verifying the integrity of signed cookies.
+# If you change this key, all old signed cookies will become invalid!
+# Make sure the secret is at least 30 characters and all random,
+# no regular words or you'll be exposed to dictionary attacks.
+ActionController::Base.cookie_verifier_secret = '<%= app_secret %>'
diff --git a/railties/lib/generators/rails/app/templates/config/initializers/inflections.rb b/railties/lib/generators/rails/app/templates/config/initializers/inflections.rb
new file mode 100644
index 0000000000..d531b8bb82
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/initializers/inflections.rb
@@ -0,0 +1,10 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new inflection rules using the following format
+# (all these examples are active by default):
+# ActiveSupport::Inflector.inflections do |inflect|
+# inflect.plural /^(ox)$/i, '\1en'
+# inflect.singular /^(ox)en/i, '\1'
+# inflect.irregular 'person', 'people'
+# inflect.uncountable %w( fish sheep )
+# end
diff --git a/railties/lib/generators/rails/app/templates/config/initializers/mime_types.rb b/railties/lib/generators/rails/app/templates/config/initializers/mime_types.rb
new file mode 100644
index 0000000000..72aca7e441
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/initializers/mime_types.rb
@@ -0,0 +1,5 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new mime types for use in respond_to blocks:
+# Mime::Type.register "text/richtext", :rtf
+# Mime::Type.register_alias "text/html", :iphone
diff --git a/railties/lib/generators/rails/app/templates/config/initializers/session_store.rb.tt b/railties/lib/generators/rails/app/templates/config/initializers/session_store.rb.tt
new file mode 100644
index 0000000000..baff704d3e
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/initializers/session_store.rb.tt
@@ -0,0 +1,15 @@
+# Be sure to restart your server when you modify this file.
+
+# Your secret key for verifying cookie session data integrity.
+# If you change this key, all old sessions will become invalid!
+# Make sure the secret is at least 30 characters and all random,
+# no regular words or you'll be exposed to dictionary attacks.
+ActionController::Base.session = {
+ :key => '_<%= app_name %>_session',
+ :secret => '<%= app_secret %>'
+}
+
+# Use the database for sessions instead of the cookie-based default,
+# which shouldn't be used to store highly confidential information
+# (create the session table with "rake db:sessions:create")
+# ActionController::Base.session_store = :active_record_store
diff --git a/railties/lib/generators/rails/app/templates/config/locales/en.yml b/railties/lib/generators/rails/app/templates/config/locales/en.yml
new file mode 100644
index 0000000000..f265c068d8
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/locales/en.yml
@@ -0,0 +1,5 @@
+# Sample localization file for English. Add more files in this directory for other locales.
+# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+
+en:
+ hello: "Hello world" \ No newline at end of file
diff --git a/railties/lib/generators/rails/app/templates/config/routes.rb b/railties/lib/generators/rails/app/templates/config/routes.rb
new file mode 100644
index 0000000000..d6c0365c04
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/routes.rb
@@ -0,0 +1,58 @@
+<%= app_const %>.routes.draw do |map|
+ # The priority is based upon order of creation:
+ # first created -> highest priority.
+
+ # Sample of regular route:
+ # match 'products/:id' => 'catalog#view'
+ # Keep in mind you can assign values other than :controller and :action
+
+ # Sample of named route:
+ # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
+ # This route can be invoked with purchase_url(:id => product.id)
+
+ # Sample resource route (maps HTTP verbs to controller actions automatically):
+ # resources :products
+
+ # Sample resource route with options:
+ # resources :products do
+ # member do
+ # get :short
+ # post :toggle
+ # end
+ #
+ # collection do
+ # get :sold
+ # end
+ # end
+
+ # Sample resource route with sub-resources:
+ # resources :products do
+ # resources :comments, :sales
+ # resource :seller
+ # end
+
+ # Sample resource route with more complex sub-resources
+ # resources :products do
+ # resources :comments
+ # resources :sales do
+ # get :recent, :on => :collection
+ # end
+ # end
+
+ # Sample resource route within a namespace:
+ # namespace :admin do
+ # # Directs /admin/products/* to Admin::ProductsController
+ # # (app/controllers/admin/products_controller.rb)
+ # resources :products
+ # end
+
+ # You can have the root of your site routed with "root"
+ # just remember to delete public/index.html.
+ # root :to => "welcome#index"
+
+ # See how all your routes lay out with "rake routes"
+
+ # This is a legacy wild controller route that's not recommended for RESTful applications.
+ # Note: This route will make all actions in every controller accessible via GET requests.
+ # match ':controller(/:action(/:id(.:format)))'
+end