diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails_generator/generators/applications/app/app_generator.rb | 5 |
1 files changed, 3 insertions, 2 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 2713854b61..0818167fc4 100644 --- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb +++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb @@ -11,8 +11,9 @@ class AppGenerator < Rails::Generator::Base super usage if args.empty? @destination_root = args.shift - @socket = MYSQL_SOCKET_LOCATIONS.find { |f| File.exists?(f) } - @socket = '/path/to/your/mysql.sock' if @socket.blank? + unless RUBY_PLATFORM =~ /mswin32/ + @socket = MYSQL_SOCKET_LOCATIONS.find { |f| File.exists?(f) } + end end def manifest |