Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. edward revised this gist Aug 29, 2009. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion epic snow leopard upgrade guide.txt
    Original file line number Diff line number Diff line change
    @@ -44,7 +44,7 @@ Upgrade your MySQL binary to the 64-bit one:
    http://distfiles.macports.org/MacPorts/MacPorts-1.8.0-10.6-SnowLeopard.dmg

    Install your favourites, taking cues from the myports.txt list
    $ sudo port install libxml2 p5-app-ack wireshark ImageMagick memcached ragel unrar
    $ sudo port install libxml2 p5-app-ack ImageMagick memcached ragel unrar
    $ sudo port install git-core +bash_completion +doc

    == Update MySQL gem
  2. edward revised this gist Aug 29, 2009. 1 changed file with 14 additions and 6 deletions.
    20 changes: 14 additions & 6 deletions epic snow leopard upgrade guide.txt
    Original file line number Diff line number Diff line change
    @@ -28,17 +28,24 @@ Upgrade your MySQL binary to the 64-bit one:
    $ sudo mysql_upgrade

    Remove /etc/my.cnf
    $ sudo rm /etc/my.cnf

    == Update MacPorts

    $ sudo port selfupdate
    You get to reinstall all your ports. Ugh.

    Note that I ran into this bug when doing so: http://www.celsius1414.com/comment/reply/1467
    Save a list of your installed ports:
    $ port installed > myports.txt

    Reinstall packages that gems like nokogiri and friends depend upon
    $ sudo port install libxml2
    Blow them all away (or at least mv) your /opt/local
    $ rm -rf /opt/local

    Install the latest version of MacPorts for Snow Leopard
    http://distfiles.macports.org/MacPorts/MacPorts-1.8.0-10.6-SnowLeopard.dmg

    Install your favourites, taking cues from the myports.txt list
    $ sudo port install libxml2 p5-app-ack wireshark ImageMagick memcached ragel unrar
    $ sudo port install git-core +bash_completion +doc
    $ sudo port install rmagick

    == Update MySQL gem

    @@ -59,4 +66,5 @@ Upgrade your MySQL binary to the 64-bit one:
    http://stackoverflow.com/questions/991708/rails-mysql-and-snow-leopard
    http://afreshcup.com/2008/10/06/upgrading-mysql-50-to-51-on-os-x/
    http://blog.costan.us/2009/07/rebuild-your-ruby-gems-if-you-update-to.html
    http://norbauer.com/notebooks/code/notes/snow-leopard-upgrading-for-rails-developers
    http://norbauer.com/notebooks/code/notes/snow-leopard-upgrading-for-rails-developers
    http://trac.macports.org/wiki/Migration
  3. edward revised this gist Aug 29, 2009. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion epic snow leopard upgrade guide.txt
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    Son, you’re now living in the land of 64-bit systems.

    That means that some of your 32-bit stuff is now broken.
    That means that some of your 32-bit shit is now broken.

    Not all is lost.

    @@ -50,6 +50,10 @@ Upgrade your MySQL binary to the 64-bit one:
    $ irb
    irb> `gem list`.each_line {|line| `sudo env ARCHFLAGS="-arch x86_64" gem install #{line.split.first}`}


    === You’re done! ===


    == References

    http://stackoverflow.com/questions/991708/rails-mysql-and-snow-leopard
  4. edward revised this gist Aug 29, 2009. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion epic snow leopard upgrade guide.txt
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    Son, you’re now living in the land of 64-bit systems.

    That means that some of your 32-bit shit is now broken.
    That means that some of your 32-bit stuff is now broken.

    Not all is lost.

  5. edward created this gist Aug 29, 2009.
    58 changes: 58 additions & 0 deletions epic snow leopard upgrade guide.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,58 @@
    === Epic Snow Leopard Upgrayyyyd Guide ===

    Son, you’re now living in the land of 64-bit systems.

    That means that some of your 32-bit shit is now broken.

    Not all is lost.

    == Fixing MySQL weirdness

    Upgrade your MySQL binary to the 64-bit one:

    Bring down the existing mysqld if it’s running.

    Install the binary: http://dev.mysql.com/downloads/mysql/5.1.html#macosx-dmg
    You want the Mac OS X 10.5 (x86_64) version.

    Boot that sucker up:
    $ sudo /usr/local/mysql-5.1.37-osx10.5-x86_64/bin/mysqld_safe

    Bring your old data into the new database:
    Create /etc/my.cnf and fill it with

    [mysqld]
    datadir=/usr/local/mysql-5.0.51b-osx10.5-x86/

    Bring over the data
    $ sudo mysql_upgrade

    Remove /etc/my.cnf

    == Update MacPorts

    $ sudo port selfupdate

    Note that I ran into this bug when doing so: http://www.celsius1414.com/comment/reply/1467

    Reinstall packages that gems like nokogiri and friends depend upon
    $ sudo port install libxml2
    $ sudo port install git-core +bash_completion +doc
    $ sudo port install rmagick

    == Update MySQL gem

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

    == Update the rest of your gems

    $ irb
    irb> `gem list`.each_line {|line| `sudo env ARCHFLAGS="-arch x86_64" gem install #{line.split.first}`}

    == References

    http://stackoverflow.com/questions/991708/rails-mysql-and-snow-leopard
    http://afreshcup.com/2008/10/06/upgrading-mysql-50-to-51-on-os-x/
    http://blog.costan.us/2009/07/rebuild-your-ruby-gems-if-you-update-to.html
    http://norbauer.com/notebooks/code/notes/snow-leopard-upgrading-for-rails-developers