25 March 2012

The bitter love of Ruby with LLVM

I love new toys, and I upgraded my XCode to 4.3.2 for that reason. Like what happens to me with all my other new toys, it broke my RVM and Ruby.

 Thanks to Shigeya, who contributed the solution and it worked for me like a charm:
  1. Uninstall XCode.
  2. Install XCode 4.3.2 (by the time I put up this post) from Apple's App Store.
  3. Open a terminal, run 'sudo xcode-select -switch /Applications/Xcode.app'.
  4. Open XCode, go to 'Xcode -> Preferences -> Components', install 'Command Line Tools'.
  5. Install RVM from master branch, or run 'rvm get head' if you've installed RVM.
  6. Install Ruby 1.9.3-p125 using RVM.
You should be able to install Ruby with no problems now. If not, you might want to do what RVM suggests:

24 March 2012

How to uninstall XCode

I have a Mac, You have a Mac; I had a problem with XCode, and now you have it too. That's why you're here, and here's how I killed it off my Mac:

sudo /Developer/Library/uninstall-devtools -mode=all
 And here's the last message displayed on my screen:

IMPORTANT: If you are going to install a previous version ofthe Developer Tools, be sure to restart the machine after in-stalling.
BUT, don't expect the same for XCode 4.3 and above. Things're getting simpler now:

sudo rm /Applications/Xcode.app 

Good luck, my friend!

23 March 2012

Uninstall MySQL from Mac Leopard/Lion

I installed MySQL 5.5.21 64 bits on my Mac OS X Lion (10.7.3), and I couldn't get it working with my Ruby 1.9.3, then I decided to uninstall it and install MySQL 32 bits. The following are the steps that I follow to remove it completely (Thanks to Tom Keur):
  1. Open the 'System Preferences' panel.
  2. Click on the 'MySQL' icon at the bottom of the panel in 'Other' section.
  3. On the 'MySQL' panel, click 'Stop MySQL Server', and uncheck the 'Automatically Start MySQL Server on Startup'.
  4. Close the panel, and open a terminal.
  5. In the terminal, run the following commands:
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm /etc/my.cnf