Installing MySQL Gem on Mac OSX with XAMPP
I was having lot of trouble on installing the MySQL Gem for Mac OSX Leopard 10.5.9 via XAMPP. I have the XAMPP running and also mySQL. Here are the steps.
1. Install XAMPP for MAC
2. Install XAMPP Dev Package
3. From your terminal type the following command and you’ll see the following
1 | sudo gem install mysql -- --with-mysql-dir=/Applications/XAMPP/xamppfiles/ -- with-mysql-lib=/Applications/XAMPP/xamppfiles/lib -- with-mysql-include=/Applications/XAMPP/xamppfiles/include/ -- with-mysql-config=/Applications/XAMPP/xamppfiles/bin/mysql_config |
Results:
1 2 3 4 5 | Building native extensions. This could take a while... Successfully installed mysql-2.7 1 gem installed Installing ri documentation for mysql-2.7... Installing RDoc documentation for mysql-2.7... |
getopt: invalid option — ‘v’
Recently, I tried to install rails and it seems it all got installed successfully and in the terminal when i type
1 2 3 4 5 6 7 8 9 10 11 12 | $ rails -v getopt: invalid option -- 'v' Terminating... $ sudo apt-get remove --purge rails $ sudo gem install rails Successfully installed rails-2.2.2 1 gem installed $ sudo ln -s /var/lib/gems/1.8/bin/rails /usr/bin/rails $ rails -v Rails 2.2.2 |

