diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-10-29 07:31:00 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-10-29 07:31:00 +0000 |
commit | 24e3dbb8062e3435fd74dea590229ea841bf45a9 (patch) | |
tree | 2dada723f468369f99bf8378c3ba14c62cef8106 /railties/lib/rails_generator | |
parent | 41943847046e188261ebf2336f83f65fc4b80fbd (diff) | |
download | rails-24e3dbb8062e3435fd74dea590229ea841bf45a9.tar.gz rails-24e3dbb8062e3435fd74dea590229ea841bf45a9.tar.bz2 rails-24e3dbb8062e3435fd74dea590229ea841bf45a9.zip |
Add default Mac + DarwinPorts MySQL socket locations to the app generator.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2800 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/rails_generator')
-rw-r--r-- | railties/lib/rails_generator/generators/applications/app/app_generator.rb | 16 |
1 files changed, 11 insertions, 5 deletions
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 e43a0433ae..3d7f9e1652 100644 --- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb +++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb @@ -11,7 +11,7 @@ class AppGenerator < Rails::Generator::Base super usage if args.empty? @destination_root = args.shift - @socket = MYSQL_SOCKET_LOCATIONS.find {|f| File.exists?(f) } + @socket = MYSQL_SOCKET_LOCATIONS.find { |f| File.exists?(f) } @socket = '/path/to/your/mysql.sock' if @socket.blank? end @@ -128,8 +128,14 @@ class AppGenerator < Rails::Generator::Base vendor/plugins ) - MYSQL_SOCKET_LOCATIONS = [ "/tmp/mysql.sock", #default - "/var/run/mysqld/mysqld.sock", #debian/gentoo - "/var/tmp/mysql.sock", # freebsd - "/var/lib/mysql/mysql.sock" ] #fedora + MYSQL_SOCKET_LOCATIONS = [ + "/tmp/mysql.sock", # default + "/var/run/mysqld/mysqld.sock", # debian/gentoo + "/var/tmp/mysql.sock", # freebsd + "/var/lib/mysql/mysql.sock", # fedora + "/opt/local/lib/mysql/mysql.sock", # fedora + "/opt/local/var/run/mysqld/mysqld.sock", # mac + darwinports + mysql + "/opt/local/var/run/mysql4/mysqld.sock", # mac + darwinports + mysql4 + "/opt/local/var/run/mysql5/mysqld.sock" # mac + darwinports + mysql5 + ] end |