Ruby on Rails
XAMPP integration

Add the XAMPP MySQL socket to the list of sockets Rails looks for when generating database.yml. Can be fixed by editing generators/applications/app/app_generator.rb and adding an extra element to the MYSQL_SOCKET_LOCATIONS array like this:

MYSQL_SOCKET_LOCATIONS = [ “/tmp/mysql.sock”, #default
“/var/run/mysqld/mysqld.sock”, #debian/gentoo
“/var/tmp/mysql.sock”, # freebsd
“/opt/lampp/var/mysql/mysql.sock”, # xampp
“/var/lib/mysql/mysql.sock” , #fedora
“/Applications/xampp/xamppfiles/var/mysql/mysql.sock” #xampp on osx

you can also do it by adding the “socket” propertie to your config/database.yml, like this:

development: adapter: mysql socket: /Applications/xampp/xamppfiles/var/mysql/mysql.sock