From: Phlip Date: 2006-09-13T05:15:46+09:00 Subject: rails mysql db:migrate etc Rubies: Examine this command line: ruby /usr/local/bin/rake db:migrate --trace First, a digression about the silly command line, before the actual question: I switched from Ubuntu to Mandriva because the former's Ruby was so broken. Mandriva's is hardly better. When I install all the Ruby RPMs, they put Ruby in /usr/local/bin/ruby . Then all the Ruby products, like Gems, screw up and look for libraries in /usr/lib/ruby. So when I completely uninstall Ruby, and completely build and install it from source, it gets this --prefix issue backwards. Gems insists on installing things to /usr/local. I'm sure there's some command line fix, and I will acknowledge any help, but the system is currently stable enough to ask the next question. I have installed MySQL, from RPMs, and my config/database.yml looks a little like this: development: adapter: mysql database: tracks host: 127.0.0.1 username: tracks password: password When I run rake db:migrate, I get this spewage: (in /home/phlip/projects/tracks_1.042) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate rake aborted! Connection refused - connect(2) /usr/lib/ruby/1.8/mysql.rb:103:in `initialize' /usr/lib/ruby/1.8/mysql.rb:103:in `new' /usr/lib/ruby/1.8/mysql.rb:103:in `real_connect' So what am I missing? Yes, the database exists, mysqld is running as a d�mon, and I have a user called 'tracks'@'127.0.0.1' granted permission to do stuff: $ mysql -u tracks -p Enter password: mysql> use tracks; Database changed If you want to tell me to add socket: /tmp/mysql.sock, the file doesn't exist, and socket: /var/lib/mysql/mysql.lock doesn't either! Oh, and I got it all working in WinXP fine... The mysql.rb is the Ruby-only one. I will build the .so version and try it. But WinXP only worked with the Ruby-only mysql.rb file! For my next magical trick, I shall figure out why CygWin's SSH keeps aborting on , and why CygWin-X keeps blanking the mouse cursor and leaving it off! -- Phlip http://www.greencheese.us/ZeekLand <-- NOT a blog!!!