Archive for the ‘Hack’ Category

 

Installing ruby-mysql on OS X Leopard

October 23rd, 2008
By: Steven Haddox
1 Comment »

So I was receiving a lovely deprecation warning from Rails tonight that if I didn’t install the C-library mysql adapter for Ruby then my applications would stop working in my environment when Rails 2.2 is released.  I decided it couldn’t be too hard to install the adapter and found out that there are a few problems with using the default gem install mysql when you are running the OS X Leopard mysql.com installation.

Anyway, the short and sweet of this is that there is a solution if your mysql gem install is giving you grief in Leopard. Simply run the following command and take note of the options in the parameter –cflags after the -I/usr/local/mysql/include directory. Those options will need to be passed in as your ARCHFLAGS value when you execute your gem install:

$ mysql_config
Usage: /usr/local/mysql/bin/mysql_config [OPTIONS]
Options:
        --cflags         [-I/usr/local/mysql/include -Os -arch x86_64 -fno-common]
        --include        [-I/usr/local/mysql/include]
        --libs           [-L/usr/local/mysql/lib -lmysqlclient -lz -lm]
        --libs_r         [-L/usr/local/mysql/lib -lmysqlclient_r -lz -lm]
        --socket         [/tmp/mysql.sock]
        --port           [3306]
        --version        [5.0.51b]
        --libmysqld-libs [-L/usr/local/mysql/lib -lmysqld -lz -lm]

In my instance (on a Mac Pro and MacBook Pro) I was able to get ruby-mysql working with the following command:

$ sudo env ARCHFLAGS="-Os -arch x86_64 -fno-common" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

Enduring To The End

September 15th, 2008
By: Steven Haddox
No Comments »

It’s not often that I get to take the things that I absolutely love the most in the world and combine them with things that I absolutely hate the most in the world.  Usually when those two things happen it is related to Microsoft Windows in some form and it absolutely kills me for several days.  Well not this time, this time it pertains to a very positive turning point in my life I believe.  I have recently acquired a Wii Fit as well as a Nike+ iPod kit.  These two small sets of hardware have enabled me to combine something I love with something I used to hate and hopefully improve my life and have fun while doing it.

I must admit that there are several factors involved in my decision to start getting more healthy.  I decided to cut the majority of soda out of my life after my incident several months ago where I had 4 kidney stones and some major medical issues that were not very pleasant to go through.  But in addition to cutting out soda there needs to be more.  Something more substantial that will make it so I’m not having a heart attack before Paisley has even graduated high school.  So here is the list of things that has helped change my motivation for working out and getting healthy: Read the rest of this entry »

Flash Happy: Simple flash updates for your Rails application

August 28th, 2008
By: Steven Haddox
No Comments »

So I’ve been learning Ruby on Rails the past few months but I’ve mostly been working on projects that already have the major underpinnings created. I’ve had the opportunity to work on a side project on and off and I’ve finally gotten one of my major hurdles accomplished and am pretty happy with how I did it. I’m open to code refinement, but I thought I’d share it since I couldn’t find much in the way of tutorials regarding flash.now with Rails via Google.

Essentially what I did was implement a way to update the regular flash and the flash.now values at the same time. Read the rest of this entry »

Having Fallen Off the Face of the Earth…

August 14th, 2008
By: Steven Haddox
1 Comment »

I thought that it might be time to give an update.  I have been very busy over with the agile evangelists at Integrum Technologies and have been loving every minute of all the things I’ve managed to absorb in the past few months.  My conversion to Rails has been drastically better than my past experience of learning other languages.  Within weeks I felt confident enough to start my own side projects and dive head-first into things that I used to wait months to fully understand how to do with previous conversions.

I have come to gain a very solid appreciation of AJAX, as long as it is done unobtrusively. I’ve also come to love the purpose and structure that a good MVC framework can provide.  I’ve come to swear by TextMate.  I can’t imagine managing a web project again without it.  I’ve found that pair programming provides amazing benefits that can never be guessed at until you’ve tried it yourself. I’ve found that my errors and refactoring due to pair programming have been exponentially improved and that my development style in general has become more efficent, more detailed, and more well-thought than in the past (in much less time).  I’ve also found that agile methodology as a method of software development just makes sense (for me at least).  Software (especially web based applications or sites) are constantly changing in their requirements, goals, needs, and acceptence criteria.  Agile methodology ties in perfectly with this dynamic lifestyle of software growth.

As to the other things that I’ve been up to, well I’ve started at least three side-projects Read the rest of this entry »

Why I Stood in Line for an iPhone 3G Today

July 11th, 2008
By: Steven Haddox
2 Comments »

I just posted the following as a comment on a blog as to why I already purchased the iPhone 3G. I thought it might be appropriate to share on my blog as well. Enjoy.

iPhone 3G + Apple tattoo

I’ll try to keep this short and simple, but don’t be surprised if you get a short novel. I am a little offended that the beginning of this post [original blog linked above] begins with such bias as to say that if Steve Jobs branded a sandwich with the Apple logo a line would form to buy it. Give most Apple “fanboys” a little more credit than that.

I personally have an Apple logo tattoo (for the letter A in my wife’s name as she converted me to Apple). I also have a Burton tattoo on my foot. Why are both of my tattoos commercial companies? Read the rest of this entry »