NSCoderNight tonight in Northern Virginia
I’ve been going to the past few NSCoderNights here in Northern Virginia. We’ve met up at Panera in Tysons before (look for the Apple logos.) But tonight we’re trying a different venue: Camille’s Sidewalk Cafe near the Courthouse Metro in Clarendon, VA. More details in Jose’s blog entry Trying a new location tonite.
It’s been pretty motivating to meet up with other Cocoa Mac and iPhone developers. I think we’re going to be discussing Cocoa Programming with Mac OS X by Aaron Hillegass soon, working our way through the chapters. I was privileged to have the experience of doing technical review on that book and I’ll have a full review of it on this blog soon. Short review: if you have the 1st or 2nd edition, it will help you get caught up to the newer Cocoa APIs and so its worth getting. If you don’t, then you definitely need this book to help you with your Cocoa programming. Big Nerd Ranch uses it as a text book for their Cocoa Bootcamps!
Cocoa / Washington DC Trivia: Aaron Hillegass grew up in Northern Virginia. We actually attended the same high school, Thomas Jefferson High School for Science and Technology, though at different times.
What to do before you do Ruby on Rails development on Mac OS X Leopard
Apple has a new series about Ruby on Rails development on Mac OS X Leopard. Its a nice article to help get you going. One thing I’d like to reiterate is that it is good to lock down your RubyGems paths. This way you will always that your RubyGems go in the right directories that Apple has set up.
So before you follow the steps in the initial Developing Rails Applications on Mac OS X Leopard article, you should take the following steps:
- Open up ~/.bash_profile in your favorite editor (create it if its not already there)
- Type in
export GEM_HOME=/Library/Ruby/Gems/1.8 - Type in
export GEM_PATH=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8 - Save ~/.bash_profile
- Execute
source ~/.bash_profile
This makes it so that no matter what version of rubygems you have, you have access to the Apple-provided gems in $GEM_PATH and you’re able to install/update new gems in $GEM_HOME.
rcov 0.8.1 fixes Safari 3 colorization
Happy Thanksgiving everyone! I hope you enjoyed time with your family and friends.
Well one new thing that you can be thankful for is rcov 0.8.1. This new version of rcov fixes the colorization problem with Safari 3, which by the way now affects Ruby programmers on 10.4.11, not just those of us on Leopard 10.5.0 - 10.5.1. Note that the WebKit team is hard at work fixing the old underlying problem. It does pay to report bugs.
Anyways, enjoy the new rcov and your turkey leftovers. The easiest way to get it if you already have rcov is to do:
sudo gem update rcov
or if you don’t already have it:
sudo gem install rcov
Related posts:
Ruby bugs on Leopard
I installed Leopard about 2 weeks ago and been doing Ruby on Rails development on it since. I encountered some bugs initially, but I managed to conquer them. I think Leopard’s great for doing RoR development. It seems faster, it seems more polished, its just very pleasant to do work in.
Here’s what I learned though about Ruby in Leopard:
1. Don’t update rubygems. It’s already up-to-date (at least as of this writing.) If you do a “gem update –system” on Leopard, you will be sorry. Because you’ll suddenly break the careful packaging Apple has done with Ruby and reduce the 20 or so gems (not sure the exact count) available down to 0.
There’s a simple fix for this though - what happens is that the places where it looks for your gems gets mixed up. What you need to do is go into your ~/.bash_profile and enter in:
export GEM_HOME=/Library/Ruby/Gems/1.8
export GEM_PATH=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
Then do a
source ~/.bash_profile
The reason why this fixes it is that GEM_PATH now points to the place where Apple put all the system-provided gems. GEM_HOME points to where Apple originally set to where you install gems. Note that GEM_PATH is “read-only” whereas GEM_HOME Is “read-write” by rubygems. Oh and if you do this, you can safely update rubygems. :)
2. rcov is broken, but you can fix it.
For some reason, rcov out of the box will include some of its own classes in the reports when profiling functional tests on Leopard. This throws off the coverage statistics.
The fix for this is to include “#{ENV[’GEM_HOME’]}” in the rcov exclusions parameter –exclude.
3. rcov reports don’t show up colorized in Safari 3.
Now once you’ve got rcov working, when you click on a class to see what lines are covered and which aren’t, you find out that you can’t on Leopard. Well that’s not exactly right. It turns out that its Safari 3. I also tested it out with the latest WebKit nightlies - its broken too. I looked into this and found that some old rcov 0.4 reports on the web render fine, but the newer rcov 0.8 ones don’t. It seems Safari 3 doesn’t like some of the internal anchor tags.
The workaround for this is to use any other browser for viewing your rcov reports on Leopard. If you’re using Firebug, you might as well use Firefox. Otherwise, Camino is good. Or if you’re the power user type, OmniWeb. Cutting edge - Shiira. I could go on and on - I’m a browser fanatic. Did I mention Flock?
Anyways… Ruby development on Leopard is actually quite good. These 3 bugs were not that big a deal. I think its great that Leopard ships with all sorts of Ruby goodness built right in. And I didn’t even mention RubyCocoa or anything like that.
Any other tips for Ruby development on Leopard? Let me know via a comment!
CCMenu helps you monitor your builds
You’re using continuous integration, right? If not, you really should. And you should probably set it up to email you if the build breaks. But there’s a nice way to get notification right on your OS X desktop: it’s CCMenu.
CCMenu is a menu item for OS X that displays the status of your projects that are being built with CruiseControl. It works with CruiseControl.rb as well which you can use for your Ruby on Rails projects, which is where I mainly use it. When your projects are good, it shows a green rounded square and when your projects break, it shows a red one. It also uses Growl to notify you whenever there is a status update on any of your projecs. Its freeware and available thanks to Erik Doernenburg.
One tip: you can have it start up automatically by going to System Preferences > Accounts > Login Items and adding CCMenu and then checking the checkbox. Perhaps that will be a preference in the future, but for now that works for me.
DC Cocoa Meetup July 15th
Hey all - I’ve been away on vacation. But we’re having a Cocoa Meetup in DC this Sunday July 15th. Here’s all the details:
DC Cocoa Meetup
Sunday, July 15, 2007
3:00 PM - 5:00 PM
Java Shack
2507 N. Franklin Rd.
Arlington, Virginia 22201
If you’re in DC and you’re doing Mac programming, I hope to see you there!
Surf around. Write a little. Remember it all.
In my spare time, I like writing apps. Mac apps. Stuff that I’d use. Stuff that makes me even happier to have a Mac. In Cocoa, of course. But a lot of these apps never see the light of day.
That changed Monday when I released a public beta of WebnoteHappy Lite. It’s a better way to do bookmarks, by writing something about each web page that interests you - you then can search and browse these webnotes.
So if you have a Mac running Tiger, check out WebnoteHappy Lite! It’s free. I’d appreciate any sort of feedback.
Mac Programmer Meeting in Northern Virginia - November 17th
We’re having a meeting of the Programming SIG of the Washington Apple Pi, which is the big local Mac users group in the area.
It should be fun. The group started rewriting a Cocoa app using Core Data and Bindings that we use for raffling off prizes at the user group meetings. It’s called…Raffler. What’d you expect? iRaffle?
Details:
What: A Bunch of Mac Guys Hacking Away on Cocoa and other stuff on PowerBooks
Where: 13161 Fox Hunt Lane, Herndon, VA
When: Thursday, November 17th, at 6:45pm
How to get in: RSVP with me via the email link in the upper left corner of my blog. I’ll tell you about the secret handshake.
Wow - video iPods!
And you buy music videos and TV shows… Very cool.
Oh yeah… iTunes 6 came out as well.
NetNewsGatorWire
Newsgator continues to buy up some of the top talent and products in the shareware industry. A few months ago, they acquired FeedDemon and hired Nick Bradbury. Today they acquired NetNewsWire and brought Brent on board.
Congratulations Brent!
—
Here’s some interesting quotes about Macs from the Q & A:
Q: Did the Intel switch play a role in this decision?
Greg: No, although the timing was certainly coincidental. I think Apple may likely increase their market share as a result of the switch, but we believe the Mac market as it exists today is interesting enough to make significant investments in.
Brent: And I should mention that we have internal builds of NetNewsWire that run on the Intel-based Mac. Thanks to help from folks at Apple, we’ve had this working for months!
…
Q: Will Brent be the only Mac user at NewsGator?
Greg: No! I have a shiny new Powerbook sitting right next to me. Seriously, though, we’re starting to circulate Macs throughout the office to certain folks…so Brent is definitely not the only one.
Q: If the support staff are all Windows users, how will they support NetNewsWire users?
Brent: NewsGator’s support team is coming up to speed very quickly on NetNewsWire; I don’t anticipate any problems whatsoever. And like Greg said, I’m not the only one who uses a Mac. In fact, I already have people emailing me asking how to do x, y, and z on their Macs – hello, switchers!
