Categories
Apple

Setting up a new Mac

I decided to do a clean install on my new [work] Mac, rather than just copying everything across from my old one. I thought I’d note down some of the things I installed, in case it comes in handy for anyone else (particularly new Mac users).

I’ve mostly ignored common cross-platform stuff like DropBox, 1Password etc, and setting up things like git and ruby. If you just want to quickly set up a Mac for ruby development, Thoughtbot’s laptop project (or Adam’s fork) might be the way to go.

If you’ve got any other can’t-live-without Mac apps that I might have missed, let me know!

From the app store:

Other apps:

Packages from homebrew (see above)

brew install direnv dos2unix elixir git mysql node phantomjs postgresql qt redis sqlite ssh-copy-id the_silver_searcher tig youtube-dl

Hidden settings

Show ~/Library in Finder:

chflags nohidden ~/Library

Enable copying from quick look preview windows:

defaults write com.apple.finder QLEnableTextSelection -bool TRUE; killall Finder

Categories
Apple

Upgrading to Snow Leopard

A quick list of things I had to sort out after upgrading to Mac OS X 10.6 Snow Leopard:

Developer Tools

Dont’ forget to run the XCode installer on the Snow Leopard DVD, otherwise you’ll have trouble getting stuff to compile, even if you don’t use XCode. You’ll also have to download and install the iPhone SDK separately if you need it (and possibly even if you don’t – I installed it anyway, just in case).

Ruby and RubyGems

I had both of these installed from source, and although most things seemed to work OK, I couldn’t get Passenger to work at all until I reinstalled them. Instructions for installing are available on HiveLogic – this will overwrite any existing versions, assuming they’re in /usr/local (the system version of Ruby isn’t touched).

Before installing rubygems I removed all my installed gems (gem list|awk '{print $1}'|xargs sudo gem unin -a – there’s probably an easier way), then I reinstalled the ones I needed afterwards.

MySQL

Although I mostly use Postgres, I reinstalled MySQL following the instructions on the Norbauer blog.

MacPorts

Apparently you can rebuild your ports by just running sudo port upgrade --force installed, but by the time I came across that I’d already trashed and reinstalled as recommended on the link above.

For some reason the MacPorts installer hung while running the postinstall scripts, but after force-quitting the installer then running sudo port sync everything seemed fine.

I added +svn to the arguments for installing git-core (as if it didn’t have enough dependencies to build already!), and also installed postgresql84-server and imagemagick.

Apache and Passenger

I tried a whole bunch of stuff to get Passenger running, but it turned out in the end that rebuilding Ruby was the answer (see above). Once I’d done that, it was a simple case of installing the passenger gem and running sudo passenger-install-apache2-module to install the module.

Vim

The standard version of MacVim mostly works under 10.6, but there’s a custom-built binary that seems much more stable and a bit snappier.

Reader Notifier

The release version of Reader Notifier doesn’t work on 10.6, but for now there’s a patched version.

Safari Plugins

ClickToFlash needs to be upgraded to 1.5fc2.

DeliciousSafari hasn’t been updated for 64-bit Safari yet, but as a workaround you can force Safari to run in 32-bit mode. Do a ‘get info’ on the Safari app (in the Applications folder), and tick ‘Open in 32-bit mode’.

iStat Menus

Turns out I was using an old version (1.3) of iStat Menus, which doesn’t work in 10.6 (I noticed the missing menu when I went to check how high all the port install shenanigans were pushing the CPU temperatures). Upgrading to 2.0 sorted it out.

FlickrExport

Again, I was using an old version of this iPhoto exporter, but £6.90 and an upgrade to 3.0.2 later and everything was working again.

Remapping caps lock to escape

Not strictly 10.6-specific, but this was something I’d been meaning to get round to since switching back to vim. I was already to start installing input manager hacks until I stumbled across a blog post somewhere mentioning that it is already configurable (and has been for a while). Just open the keyboard preferences, hit ‘Modifier Keys…’ and change the action.

Categories
Apple

[BarcampLondon3] Obscure Mac Apps (Melinda & Martin)

  • KeyCue (€19.99 + VAT)
  • Caffeine (free) – prevents sleeping, display dimming etc
  • iStat menus (free) – also includes menubar clock like Magical
  • NameChanger (free) – bulk file renaming
  • Yojimbo ($39) – stores and tags web pages, documents etc (the actual content, not just a link). Also a web version.
  • Keyboard Cleaner (free) – disables keyboard
  • Audio Hijack Pro ($32) – record any system audio.
  • Bento – personal version of Filemaker
  • Picturesque ($20 shareware) – uses Core Image to do all sorts of cool image effects
  • XLD (free/OSS) – converts various lossless audio formats
  • ImageWell (free) – batch image editing (see also Skitch)
  • FreeDMG (free, unsurprisingly) – Simple disk image creation
  • ZapMac (free) – wacky speed-reading thing
  • Nocturne (free) – ‘night mode’ for working more comfortably in the dark
  • Remote Buddy (€19.99) – use Apple remote with any app, or for browsing files. Also allows you to use Wiimote via bluetooth.

[Update: it seems I was misinformed – Skitch is free too.]

[tags]barcamplondon3, mac, applications[/tags]

Categories
Apple Ruby

Ruby in Leopard: so close and yet…

I was quite excited to see the announcement of improved Ruby and Rails support in Leopard, and one of the first things I did after upgrading was to delete my MacPorts installations of Ruby and RubyGems, and try using the built-in ones instead.

For a while, all seemed well. The milk was cold, the food stayed fresh, my specs still passed, my Rails projects still worked, and even the light worked when you opened the door.

But then the trouble started.

Firstly I tried updating and installing gems while behind a firewall. The gem command completely ignored my http_proxy setting, and when I explicitly provided the proxy using -p, I got this error:

ERROR:  While executing gem ... (NoMethodError)
    undefined method `[]=' for #

I worked round this by downloading the gems manually and installing the local copies (despite this being a pain, especially when there are dependencies).

I then tried using gemsonrails to freeze some gems, and it got confused by the fact that Leopard stores built-in gems separately from user-installed ones. Thinking about it, if I’d successfully frozen the gem, it might have turned out to have been tweaked in some Mac-specific way and broken on other platforms.

Forgetting about that issue, I carried on with other work for a while, then found that autotest wouldn’t work, and mysteriously was trying to run something from /opt/local (where MacPorts install lived). Even after removing any gem-related scripts from /opt/local/bin, the problem persisted.

Oh well, looks like I’ll be re-installing everything using MacPorts. I’m not sure whether all these problems are intrinsic to the Ruby installation that comes with the system, or whether some are caused by lingering remains of my MacPorts installation – I’d be interested to hear how others got on.

[tags]ruby, rails, mac, 10.5, leopard[/tags]

Categories
Apple

Apple keyboard symbols

There’s been a lot of comment about Apple removing the Apple symbol from the command key on the new iMac keyboard, and adding the word ‘command’. I tend to agree that it’s a good thing. It saves on those ever-popular Just hit command-S. No, the one with the cloverleaf on it. conversations, and it was never supposed to be called the Apple key anyway, as far as I know.

What puzzles me is why they seem to have removed the symbol from the option key (which I refuse to call ‘alt’) on all their recent keyboards. What are new Mac users going to think when they are presented with a shortcut description on a menu that looks like cmd-option-S, and there’s no key with the Option symbol?

Categories
Apple

Apple and DRM-free music

I’ve never quite understood the attitude of people who won’t buy an iPod for the sole reason that the iTunes music store uses DRM – after all, no-one forces iPod owners to buy music from iTunes, rather than ripping it from CDs they own or obtaining unprotected MP3s elsewhere. As DRM schemes go, FairPlay isn’t too bad (allowing you to burn the music to a CD, for example).