aboutsummaryrefslogtreecommitdiffstats
path: root/railties/configs
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2005-11-18 07:30:05 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2005-11-18 07:30:05 +0000
commitae76e227310389170775d0d3cef963daa793e29f (patch)
tree73539245a86ec738248c58ce04166016f9a9b5ac /railties/configs
parentdb871c8d54175a11e113fd8b147a041a4a44dfe9 (diff)
downloadrails-ae76e227310389170775d0d3cef963daa793e29f.tar.gz
rails-ae76e227310389170775d0d3cef963daa793e29f.tar.bz2
rails-ae76e227310389170775d0d3cef963daa793e29f.zip
Windows: eliminate the socket option in database.yml. Closes #2924.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3082 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/configs')
-rw-r--r--railties/configs/database.yml41
1 files changed, 28 insertions, 13 deletions
diff --git a/railties/configs/database.yml b/railties/configs/database.yml
index c282a1749d..abace3365d 100644
--- a/railties/configs/database.yml
+++ b/railties/configs/database.yml
@@ -1,8 +1,13 @@
# MySQL (default setup). Versions 4.1 and 5.0 are recommended.
#
-# Get the fast C bindings:
+# Install the MySQL driver:
# gem install mysql
-# (on OS X: gem install mysql -- --include=/usr/local/lib)
+# On MacOS X:
+# gem install mysql -- --include=/usr/local/lib
+# On Windows:
+# There is no gem for Windows. Install mysql.so from RubyForApache.
+# http://rubyforge.org/projects/rubyforapache
+#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
@@ -10,13 +15,12 @@ development:
database: <%= app_name %>_development
username: root
password:
-<%= " socket: #{socket}" if socket %>
+<% if socket -%>
+ socket: <%= socket %>
+<% else -%>
+ host: localhost
+<% end -%>
- # Connect on a TCP socket. If omitted, the adapter will connect on the
- # domain socket given by socket instead.
- #host: localhost
- #port: 3306
-
# 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.
@@ -25,16 +29,26 @@ test:
database: <%= app_name %>_test
username: root
password:
-<%= " socket: #{socket}" if socket %>
+<% if socket -%>
+ socket: <%= socket %>
+<% else -%>
+ host: localhost
+<% end -%>
production:
adapter: mysql
database: <%= app_name %>_production
username: root
password:
-<%= " socket: #{socket}" if socket %>
+<% if socket -%>
+ socket: <%= socket %>
+<% else -%>
+ host: localhost
+<% end -%>
+### Example database connections. You can safely delete these. ###
+
# PostgreSQL versions 7.4 - 8.1
#
# Get the C bindings:
@@ -48,8 +62,9 @@ postgresql_example:
password:
# Connect on a TCP socket. Omitted by default since the client uses a
- # domain socket that doesn't need configuration.
- #host: remote-database
+ # 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
@@ -82,4 +97,4 @@ sqlite3_example:
# In-memory SQLite 3 database. Useful for tests.
sqlite3_in_memory_example:
adapter: sqlite3
- database: ":memory:" \ No newline at end of file
+ database: ":memory:"