Archive for the ‘mac’ Category

h1

Building librets on Mac OSX

September 1, 2007

SpaghettiI’ve used librets with Ruby on WinXP for a while now, but now I need it on my new Mac to try out some new ideas with RETS. Clearly, I’m a Mac “noob”, but boy – was this freakin’ hard! I’ve documented it here for future reference. Hopefully it will help someone else out.

Download librets

  • Download librets-1.1.9.tar.gz from CRT.
  • According to /doc/build/mac-osx.txt and unix.txt, it looks like there’s a lot of dependencies to install and build, which I’m not too comfortable doing manually.
  • There’s a note that that the OpenDarwin package manager can install these for you, and I remembered reading about MacPorts earlier, so that seems worth installing.

Install MacPorts

  • Download and install MacPorts from http://www.macports.org/
  • Make sure path is correct according to installation instructions.
  • Update MacPorts using “sudo port selfupdate”.

Install dependencies

  • Install Boost using “sudo port install boost”. Takes a while – about 15 minutes for me.
  • Install Expat using “sudo port install expat”
  • Install ANTLR using “sudo port install antlr”
  • Install libcurl using “sudo port install curl”
  • Install swig using “sudo port install swig”. This was not documented as a dependency, so it took a while to figure this one out after the below steps kept failing.

Build librets

  • “./configure” kept returning errors finding Expat and Boost files.
  • Used “./configure –with-expat-prefix=/opt/local –with-boost-prefix=/opt/local –enable-shared_dependencies” instead.
  • “make”
  • “sudo make install”

Build librets ruby

  • In the project/swig folder, use “make ruby”

Test

  • In the project/swig/ruby folder, run “ruby login.rb” and “ruby search.rb”

You’ll know now if you’ve got everything dialed in. Note that when you are writing your own Ruby code in a different folder, make sure you include the path to librets.rb at the top like this:

# Prepend load path with path to librets.rb
$:.unshift(‘/usr/local/src/librets-1.1.9/project/swig/ruby’)
require ‘librets’
include Librets

Geez! That took a while. I guess if I’d had a lot of *nix experience, it would have been easier, but librets has a special Windows install that easier.

Special thanks to the CRT guys for making librets freely available.

h1

Why a new Mac?

August 28, 2007

My home PC was about five years old and dragging running WinXP. I tried a little experiment with Ubuntu and I liked it a lot – more than XP for what I was doing at home. I but could never get sleep mode and color photos on the Canon Pixma i4000 working right, and those proved to be deal killers. After a few months, I gave up.

So I needed a new computer – web, e-mail, spreadsheet, photos, minor video – basic stuff.

Reasons I decided to try a Mac:

  1. With Firefox, OpenOffice, and Parallels, you no longer need Windows to run your most used apps. I decided the only app I really needed to run that required Windows was MS Money, and Parallels has that task covered.
  2. My new favorite programming language is Ruby, and that crowd is full of switchers. No need for Windows to write web apps.
  3. Lot’s of people I respect have been leaving Windows for a Mac and cite the “OS’s are becoming irrelevant, so why not use a beautiful OS” meme. See Marc Andreessen (he of Netscape, Opsware, Ning, and the cover of Time Magazine fame) and Marc Cuban (he of the Dallas Mavericks, broadcast.com, and collaring his Yahoo! stock fame).
  4. I’ve got Greg to rely on for tech support.
  5. I’d liked NOT using XP so much with Ubuntu, but needed a little more driver support and ease of use.

iMacI waited for the new 24-inch iMac’s to come out and snagged one the first week. The display is unreal, the desktop is beautiful, and everything just works. I can run WinXP in a window faster than on my old computer, and I can even drop down into Terminal for a bash shell. There’s a reason I’m seeing more and more Mac notebooks at every conference I go to.

h1

You gotta start somewhere

August 27, 2007

Well, well. Bought a new iMac and set up a blog. What’s the world coming to?