I wanted to use a ruby environment inside a Ubuntu VM but still be able to edit text files in Textmate. So I shared out my project folder and fired up a watchr script I made. Unfortunately, it didn’t work at all.
I tried a few different libs, including rev, rb-inotify, rb-fsevents (which turned out to be mac only) but nothing was firing when I’d save a file. I thought maybe rev or watchr was broken in 1.9 but that was not the case. The problem is the vmware shared folders. When you do a write, modify or whatever, it doesn’t fire the same hooks as a local event does:
Modify File -> Textmate Save -> project/foo.txt (does not fire in watchr)
Modify File -> Vi Save in VM -> project/foo.txt (watchr fires)
And it wasn’t just watchr (as I said), every ruby library was seeing the same thing. So I gave up on the shared folders through VMware and just installed netatalk.
sudo aptitude install netatalk
I can edit files in Textmate this way and watchr works as expected. So why is this important? Because a tight REPL is important. And watchr / wtchr makes the tight loop happen. This is also probably going to happen if you use autotest in a project with lib/* test/* too.
Pretty specific but I hope it helps someone.
So you’ve replaced the batteries, restarted your mouse or whatever. You have a bluetooth mouse that you need to reconnect or re-pair but you don’t have a mouse to get to the bluetooth icon in the notification area or status bar location.
Here what you do:
- Command Key + Shift + / – gets you into the help area in any menu
- Right arrow – gets you to the Apple menu
- Down arrow until System Preferences
- Enter – opens System Preferences
- Type mouse – in the search box and hit enter will open the mouse pane
- Hit enter at the “no mouse found” screen – this will pair your mouse if it’s powered on and trying to pair

Problem solved. Leave a comment if it works or a similar problem but different solution worked for you. If you can’t click in the comment box, just scream really loud towards my email address. :)
I recently moved my Mac Pro dev box to homebrew from macports. Doing the mysql move (the lazy way — moving the data directory) was easy enough but doing a massive `brew install` of a bunch of packages didn’t work when I got to nmap (the network port scanner).
Specifically the linker error (maybe the linker … looks to a stacktrace to a Ruby and Java guy) was this:
Undefined symbols:
"ScriptResult::get_id() const", referenced from:
formatScriptOutput(ScriptResult) in output.o
printhostscriptresults(Target*) in output.o
printportoutput(Target*, PortList*) in output.o
"ScriptResult::get_output() const", referenced from:
formatScriptOutput(ScriptResult) in output.o
printhostscriptresults(Target*) in output.o
printportoutput(Target*, PortList*) in output.o
"open_nse()", referenced from:
nmap_main(int, char**)in nmap.o
"close_nse()", referenced from:
nmap_free_mem() in nmap.o
"script_scan(std::vector >&)", referenced from:
nmap_main(int, char**)in nmap.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [nmap] Error 1
make: *** [all] Error 2
Exit status: 2
http://github.com/mxcl/homebrew/blob/master/Library/Formula/nmap.rb#L1
Error: Failure while executing: make
Please report this bug at http://github.com/mxcl/homebrew/issues
These existing issues may help you:
http://github.com/mxcl/homebrew/issues/#issue/3128
I love the little URL for more help at the bottom, unfortunately a redirect killed the help. The correct URL is here. Maybe an anchor tag in the wrong place on the URL, who knows. Anyway, I posted a note on the issue site as well, I got around the issue by doing this first:
brew install lua
Then just install nmap like before:
brew install nmap
Worked for me.
A blind upgrade of all macports packages broke my ruby project because it uses imagemagick.
dlopen(/opt/local/lib/ruby/gems/1.8/gems/rmagick-2.13.1/lib/RMagick2.bundle, 9): Library not loaded: /opt/local/lib/libMagickCore.3.dylib
Referenced from: /opt/local/lib/ruby/gems/1.8/gems/rmagick-2.13.1/lib/RMagick2.bundle
Reason: image not found - /opt/local/lib/ruby/gems/1.8/gems/rmagick-2.13.1/lib/RMagick2.bundle
Massive hack incoming:
cd /opt/local/lib
sudo ln -s libMagickCore.4.dylib libMagickCore.3.dylib
There should be a better solution but I can’t find one until macports gets it’s goddamn *bEEp* straight. I swear to deity, every time I do a sudo port upgrade outdated, something breaks. I know it’s not macports fault but the nature of native ruby gem extensions but I’m just going to avoid upgrading.
Something else to consider is my recent switch to homebrew. I haven’t made the switch on all my boxes and the ImageMagick problem isn’t related to the package manager. I do prefer brew’s command structure. Moving MySQL wasn’t insanely difficult but I did cheat by just doing a stupid copy of the MySQL data files.

I went to renew my membership on my iPhone developer account and although the membership is $99/year, my expiration date was only extended out for 3 months. I opened a ticket and it took about a month or two to get this thing resolved. I had to send screenshots, steps and evidence that I was doing the right thing (ok, fine, tier 1 support). Eventually I got a person that had a trick up their sleeve but didn’t quite get it right. I’m blogging this in case this is happening to someone else.
First, the symptoms. Let’s say your dev account is about to expire in January 2010. You want to renew for another year. You add a year subscription to your cart, pay for it. You’d expect your new expire date to be Jan-2011. But in your profile and in the “thanks for ordering” activation page it says March 2010 or something else wrong. Support send me activation links basically to the same page that wouldn’t activate any differently. Each time I checked out, it would say March 2010.
The trick was to click on renew membership (as if paying again), click the checkbox to select which membership you want to buy ($99 year) and hit continue. Now you’re on a “Review your purchase” page. Click continue here. Finally, it says “Proceed to your country’s Apple Online Store to purchase” and has an add to cart button. Stop here.
Click the following link: http://developer.apple.com/iphone/enroll/activate.action. It should bring you to a page with a single textbox for your activation code (the one you’ve been trying to use all along). Put this in and hit continue. Your expire date should be correct now. If not, try using a link formatted like this:
http://developer.apple.com/iphone/enroll/activate.action?activationCode=YOURCODEHERE
Seems like they have some bug in the dev store. Please comment if this helped you so it’s documented.
I ran into a problem that kept me busy over the weekend. It seems that rmagick (which is requires for the awesome sparklines project will compile and run on Snow Leopard, however it has a critical bug when trying to use it. The script/server process will crash with a “Trace/BPT trap” error. The logs won’t say anything and the hell if anything is going to appear on the browser. WTF.
Here’s my stack on my Mac: (do not use this stack, this is just for informational purposes only)
- ruby19 installed via macports: sudo install ruby19
- regular rubygems installed
- ImageMagick 6.6.0-0 installed via macports
- A bunch of github gems installed but not firing on the controller method that crashes
So I started over on a CentOS 5.4 VM just to try out my stack and it worked. Except, I used ruby 1.8.7 compiled via source. It’s a really lengthy process and it’ll be part of my README if I ever get this project done. On CentOS you have to compile and install ImageMagick yourself because yum has a really old version. There’s a ton of devel dependencies too. If anyone needs the instructions, leave a comment and I’ll copy/paste from my README.
So I suspected that ruby 1.9 was causing problems my mac laptop and that turned out to be true. I did a sudo port uninstall ruby19 and then a sudo port install ruby. I had to reinstall all the gems again but it wasn’t too bad. If port gives you a ln error, just exit your shell and open a new one.
So RMagick, ImageMagick and ruby 1.9 do not play together.
Growl’s network notifications weren’t working. Either sending or receiving. I had two machines that had growl cleanly installed and my main machine that’s had many versions installed over the years. It was my main box with a dirty growl history that was having problems.
I found a post on cocoaforge that helped a lot. First, I ran the uninstall applescript (I always keep uninstallers in ~/Uninstallers but you can find it in the Growl.dmg). That didn’t really work, it gave me an Apple Script time out. So I removed everything manually. I deleted the pref pane from SysPrefs by right-clicking on Growl and selecting remove.

After that was done I removed the preferences file from ~/Library/Preferences and also a folder under ~/Library/Application Support called Growl (has two subfolders called Tickets and Plugins). I emptied trash. Reinstalled Growl 1.2 (latest). I didn’t restart. I re-setup the network bit of Growl on this page:

Notifications started working. Now all my boxes are notified when something cool happens. Weee!
Here’s an esoteric fix for something I wanted to do. In a certain game, right click will move the camera. For some reason, when hosting synergy on the Mac (as the server) and connecting a Windows client, the right clicking gets whacked. It works fine the other way (don’t ask me).
So I want to hit scroll lock to lock the screen so that mouse-looking works. Except there’s no scroll lock button on a Mac keyboard! Doh. But I find a solution:
keystroke(f13) = lockCursorToScreen(toggle)
Found on mattcutts.com, this is the option I need. I use SynergyKM, which is a Mac-ified app to control synergy. It doesn’t use the conf file of synergy but instead uses a .plist property file. So I edited it to look like this:
And viola, roll over to the XP box from Mac, hit F13 and mouse look works in WoW (or probably any other drag-tracking app).
Synergy is a great tool for sharing multiple screens (reverse KVM) but for some reason lately I’ve noticed that if I’m physically on the center screen, then the mouse recenters occasionally. It’s pretty annoying.
I turned on debug log and looked in ~/Library/Logs/synergyd.log. I found this:
2007-10-04 22:12:11.894 Synergyd[337] DEBUG: dropped bogus motion -840,-526
I searched sourceforge for that string and found code that essentially centers the mouse when it detects motion on the primary screen. There doesn’t seem to be an option to control the behavior, so short of me making a patch, I don’t see a solution.
UPDATE: I found a workaround, simply move your mouse over to the display that it being buggy and the if() condition doesn’t fire off. So in my case, my mac connects to my PC’s keyboard and mouse. I move the PC’s mouse over to the Mac screen and the Mac stops acting weird (the centering problem).
When I typed port, portmirror or anything related to darwinports (macports), I got a strange error with no google hits.
# portmirror
can't find package macports
while executing
"package require macports"
(file "/opt/local/bin/portmirror" line 11)
stormbringer:~/phonedmg root# port
can't find package macports
while executing
"package require macports"
(file "/opt/local/bin/port" line 42)
The solution was to download macports 1.5 and run it again. It’s been a while since I had used ports on my Mac and maybe the project got renamed or changed. I dunno.
Then “port selfupdate” failed with “Directory not empty” errors from mv:rename so I did this:
mv /opt/local/var/db/dports/distfiles/ /opt/local/var/macports/distfiles
mv /opt/local/var/db/dports/receipts/ /opt/local/var/macports/receipts/
mv /opt/local/var/db/dports/software/ /opt/local/var/macports/software/
Then it seemed to work:
# port selfupdate
MacPorts base version 1.5 installed
Downloaded MacPorts base version 1.510
Configuring, Building and Installing new MacPorts base
selfupdate done!