Fork Of

Revisions

gist: 177561 Download_button fork
public
Public Clone URL: git://gist.github.com/177561.git
Embed All Files: show embed
epic snow leopard upgrade guide.txt #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      === 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
      $ sudo rm /etc/my.cnf
  
== Update MacPorts
 
  You get to reinstall all your ports. Ugh.
  
  Save a list of your installed ports:
    $ port installed > myports.txt
  
  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 ImageMagick memcached ragel unrar
    $ sudo port install git-core +bash_completion +doc
 
== 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}`}
 
 
            === You’re done! ===
 
 
== 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
  http://trac.macports.org/wiki/Migration