Monday, June 10, 2013

Get fit?

So I'm determined to loose some weight and get back into shape.  I find it easier if I document this somewhere so I suppose this is as good as anywhere.  Currently if I plot myself I would be listed as morbidly obese (sad eh).  So time to get up and do something about it.  Ive been starting with the bike.  Yesterday I rode up Green Canyon on my Mtn Bike.  Today I took the kids on a 10 mile round trip to the park.  I need to find a good app for the phone that documents what I eat so I can count calories easily.  At this point I am in full bring it on mode.  Below is a picture from the ride

Sunday, February 17, 2013

Installing rails on 10.8.2

So I decided to install rails on my new MacbookPro running 10.8.2 ... should be easy I thought .... They include ruby now right?  It wasn't as easy as I had hoped.  I figured I would document it so that I could go back later.  I started off running a google query and coming up with the following blog http://hathaway.cc/2012/04/how-to-setup-mac-os-x-lion-for-ruby-and-rails-development/ .  This worked fairly well with the following exceptions.

Installing Xcode (Easy installed from the app store and then added the command line utilities)

Install HomeBrew This was easy but the link he gives is broken ... from their home page I did the following 
$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
 
Installing mysql
brew install mysql
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" \
-datadir=/usr/local/var/mysql --tmpdir=/tmp
 I can now run mysql.server start to manually start mysql ... I understand this can be automated but I don't want mysql running all of the time as I'm not doing rails development all that often.


Install rbenv and ruby-build (easy just like the instructions)

brew install rbenv
brew install ruby-build
also added eval "$(rbenv init -) to the .bash_profile as sugessted

Install pow
I had never used this before but it rocks!

curl get.pow.cx | sh 

Install Ruby
great! this is why I was following this in the first place but when I tried to run
rbenv install 1.9.3-p0 I had no luck you get a long error message explaining that you need gcc not apples watered down version to install anything earlier than p125 ... well I'm not picky I tried to run
rbenv install 1.9.3-p385 (I got the version from running benv install -l) but this too threw and error

error: implicit conversion loses integer precision: 'st_index_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
    return t->num_entries;


After googling the error I found this  explaining that there was a problem but you could ignore it.  A user named uasi seemed to indicate that you could have the error ignored by setting the cflags environment variable so the following command worked for me

CFLAGS="-Wno-error=shorten-64-to-32" rbenv install 1.9.3-p385

After that you can continue to follow his excellent instructions .