Tag: OS X

New Macbooks are out

Apple’s 2011 refresh for it’s Macbook Pro line is out and wow am I excited to get one (read more via TechieXplorer).

I’m looking to get this SKU:

  • 2.0GHz quad-core Intel Core i7 or 2.2GHz quad-core Intel Core i7
  • 4GB 1333MHz RAM
  • 500GB 5400-rpm or 750GB 5400-rpm hard disk drive
  • Intel HD Graphics 3000 integrated graphics card
  • AMD Radeon HD 6490M with 256MB GDDR5 or AMD Radeon HD 6750M with 1GB GDDR5 dedicated GPU
  • Built-in battery (7 hours)

The price? $1799.  Pretty expensive yep, but I think I can manage with my current income – expenditures.  I just have to wait until I build my new gaming rig before shelling out cash for a new Macbook Pro

Installing the mysql gem on OS X 10.6 (Snow Leopard)

The first thing on my developer itinerary after getting my MacBook Pro is to install my development tools. That includes upgrading the ruby and rails gem versions packaged with OS X 10.6 and installing Xcode which is included on Snow Leopard’s install DVD. Things proceed smoothly until I tried to install the mysql gem.

Ruby threw a fit and dumped this message:

$ sudo gem install mysql
Building native extensions.  This could take a while...
ERROR:  Error installing mysql:
ERROR: Failed to build gem native extension.

Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/mysql-2.8.1 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out

After some google-fu, I found out that when installing the mysql gem on OS X, you need to point it to where your mysql_config file is placed. Below is the complete guide on how to how to install the mysql gem on Snow Leopard.

  • Download your preferred MYSQL version from the community download site. If you’re on Snow Leopard, you may want to install the 64-bit version.
  • Install mysql via dmg or compile it from source.
  • Type ‘which mysql_config’ on the terminal to locate said config. Take note of this location as we’ll use it on the next step.
  • Install the mysql gem with the command below. If the location for your mysql config is different with the one below, use that instead.
     sudo env ARCHFLAGS="-Os -arch x86_64 -fno-common" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
    

    Note that if you’re using the 32-bit version, you have to use:

     sudo env ARCHFLAGS="-Os -arch i386 -fno-common" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
    
  • And success!
    $  sudo env ARCHFLAGS="-Os -arch x86_64 -fno-common" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
    Building native extensions.  This could take a while...
    Successfully installed mysql-2.8.1
    1 gem installed
    Installing ri documentation for mysql-2.8.1...
    ...
    

If you are having problems, or have any suggestions, please post a comment.