My Writings. My Thoughts.
Snow Leopard with Ruby 1.9 and Rails 2.3.5
// December 24th, 2009 // No Comments » // Dev, OSX, Ruby
I’m working my way through “Agile Web Development with Rails – Third Edition” and the latest version of the PickAxe “Programming Ruby – Third Edition” books of the Pragmatic Programmers.
As Snow Leopard is my OS I need to update the default shipped Ruby and Rails versions to get to Ruby 1.9 and Rails on top of that.
I’ve been installing and uninstalling multiple things before finally settling on my ultimate recipe for installing the correct Ruby version and Gems:
(Within Terminal and already running the latest version of macports )
sudo port install ruby19 +nosuffix sudo port install sqlite3 sudo gem update --system sudo gem install sqlite3-ruby sudo gem install rails
Great Visual Diff/Merge tool for OSX
// December 8th, 2009 // No Comments » // Dev, OSX
Back when my primary dev-environment was Microsoft I would use the open-source tool WinMerge for all my Diff/Merge needs. Great tool, good performance, does the job.
Now that I’ve switched to the Mac I had to find a new visual Diff/Merge tool, and I want it cheap, or better free ![]()
Searches in the past didn’t turn up any satisfying results, but I think I’ve found the tool to do the job. Sourcegear, a company I knew from the past for their Vault product, which is a compelling replacement of Visual SourceSafe, has been so kind to distribute their Diff/Merge tool as a standalone and free cross-platform tool.
Downloaded, used it for comparing and merging FAST indexprofile files (which are plain XML), loving it.
Oh, I’m not affiliated to Sourcegear in any way, just like their Diff/Merge tool on OSX.
Restoring MacBook Pro using Time Capsule
// October 26th, 2009 // No Comments » // Digital Life
To my horror suddenly my MacBook Pro wouldn’t display anything anymore, a blank screen was all I got. Hooked up an external monitor, no success. Searched the internet and concluded that I might have a broken Nvidia graphics “card” (it’s soldered on the board so it’s not really a card) as the batch my MBP is from contains a faulty Nvidia card http://support.apple.com/kb/TS2377
So I went to an Apple Service Center where they concluded that indeed my graphics card is broken and that repair is covered by the extended warranty. The ASC had a MBP for rent for the duration of the repair, but as I was late on the day they weren’t able to swap the harddisks.
So I took the MBP home and ventured out to restore a Time Machine backup. I have a Time Capsule so there should be a recent backup available.
The MBP booted into the installation of Leopard, after the introduction video (couldn’t bypass watching the whole video) I was give the option to do a restore from a backup. Selected the option, the MBP found my Time Capsule but after I selected a backup-set got the Spinning Beachball and nothing happening for more than an hour, I uttered a small curse.
What the heck, let’s boot into Leopard and start the Migration Assistant. Hmm, the same experience, found my Time Capsule but after selecting the backup-set a Beachball. Damn.
Read something about restoring a backup by starting the restore tool off from the OSX installation CD. So started the utilities, selected the restore, hmm it can’t find my Time Capsule. Looked up a knowledgebase article on the Apple site and found that I had to start the Wireless network by clicking the WIFI icon in the upper right corner of the utilities screen. Ok, so the backup-set can be selected, but you guessed it, a Beachball.
Than it dawned me that the backup was made with Time Machine running Snow Leopard not Leopard, so I put in the Snow Leopard DVD, started the Utilities, selected restore from Time Capsule, saw the backupset, and now was able to select exactly which backup I wanted to restore. Selected the most recent (which was from just before the screen problems started) and went to bed.
The next morning I was greeted with my trusted login-screen and everything was installed in such a way that I couldn’t tell that I was working on another machine. Great, love automatic backups. Note to Apple, a meaningful message along the lines of “Backup was created with a newer version of Time Machine” would have saved me a couple of hours.
Switching to Git
// August 11th, 2009 // No Comments » // Digital Life
I’ve been using subversion for a very long time. During that period I’ve got several people and one company hooked on this version control system after I got frustrated with SourceSafe. SourceSafe was the only version control software developers on the Microsoft platform knew, if they did any. For those people subversion was a giant leap, but once they saw it in action on they’re large .net projects they were sold.
Once I moved to the Mac OS X platform subversion happily travelled along for my local version control.
I’ve always had two main frustrations with subversion:
- In a local situation you are stuck with a directory on your system which doesn’t contain anything sensible: your local repository
- It is not easy to convert a local directory to a working copy under version control (add/commit/checkout)
Now I’ve switched to Git and I will undoubtly find issues using it, but so far my two main frustrations are solved with three lines of code
git init git add . git commit -m "First commit"
iCal problem CalDAVDeleteEntityQueueableOperation
// August 4th, 2009 // No Comments » // Digital Life
Just one result in Google, but exactly the problem I was experiencing ![]()
Changed the preference and restarted iCal. Problem solved.
Thanks Matt.
Are you still listening?
// July 28th, 2009 // No Comments » // blog
Yeah I know, it’s been a while. I’ve been putting this off for a very, very long time.
I used to blog on tech-stuff I ran into in my job, I don’t think that will come back. We’ll see where this is going.
Searching the Java RunTime for Vista 64-bit
// August 31st, 2007 // No Comments » // Uncategorized
I had a hard time finding the correct JRE for my Vista 64-bit installation. Apparantly it’s not on the Www.Java.Com site, at least I couldn’t find it on the downloads page, and don’t get me started on the automated detection/installation procedure at that site. I had more luck on the Sun-site, follow the path of downloads, category, Java, Java 2 Platform Standard Edition, Latest Release (in the top blue header part) for some reason it redirects me first to the Java 5 downloads, Java Runtime 6 update X and there on the bottom the 64-bit for Windows AMD.
BizTalk Web Service Publishing Wizard Error: Method not found: System.Xml.Serialization.XmlMapping.get_ElementName()
// August 17th, 2007 // No Comments » // BizTalk 2004
I was stunned, I had defined a Request schema and a Response schema to be used by a Web Service I wanted to implement in BizTalk 2004. The Request schema was straightforward, just some fields which made up a Service Request. The response would be a collection of 0 to N “Records”.
I had the Response Schema defined somewhere around the lines of this:
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://BizTalk_Webservice_Publishing_issue.Schema2"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
targetNamespace="http://BizTalk_Webservice_Publishing_issue.Schema2"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Root">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="Record">
<xs:complexType>
<xs:sequence>
<xs:element name="Field1" type="xs:string" />
<xs:element name="Field2" type="xs:string" />
<xs:element name="Field3" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Looks sensible right? It compiles okay, I can make an Orchestration with a Request-Response port, everything looks fine, until the Web Service Publishing Wizard gives me:
Failed to create project http://localhost/BizTalk_Webservice_Publishing_issue_Proxy. [Microsoft.BizTalk.WebServices.PublishingException] Failed to construct code for schema "http://BizTalk_Webservice_Publishing_issue.Schema2". Method not found: System.String System.Xml.Serialization.XmlMapping.get_ElementName().
I didn’t get it, what was wrong? After searching the internet (in which I obviously found one of Patrick’s blogpost which didn’t help in this case as I had no imported schema’s) I began some experiments. I determined that the cause lies in the multiplicity on the Record element. It didn’t matter what values I used, as soon as the schema allowed more than one Record element to be a part of the message, the Wizard failed on me.
I don’t remember how I got the idea, but the solution is rather simple. It appears that the Wizard doesn’t like the multiplicity on the element. So, let’s put the multiplicity one level higher, around the element, like this:
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://BizTalk_Webservice_Publishing_issue.Schema2"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
targetNamespace="http://BizTalk_Webservice_Publishing_issue.Schema2"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Root">
<xs:complexType>
<xs:sequence>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="Record">
<xs:complexType>
<xs:sequence>
<xs:element name="Field1" type="xs:string" />
<xs:element name="Field2" type="xs:string" />
<xs:element name="Field3" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
So after encapsulating the Record element in a Sequence on which I added the multiplicity, all was well. I don’t think I fully understand why the Wizard (or XSD.exe which is running the show in the background) fails on the first version, but now I do know how to solve this.
Update: fixed the formatting of the XML Schema’s for readability.
Visual Studio Debugging Problems
// May 9th, 2007 // No Comments » // .Net, Debugging
Note to self: An excellent post for all your Visual Studio debugging problems.
This one has helped me more than once, kudo’s to Min Kwan Park.
I want to store more items
// January 24th, 2007 // No Comments » // Uncategorized
I’m running Vista and Office 2007. Previously I used Newsgator for all my blogreading, but the new Windows RSS platform in combination with Outlook 2007 brings me the exact same functionality.
It appears that the feeds have a limit for the number of items they can contain, this limit is by default set at 200. That’s not enough for me. You can set the limit by modifying the feed properties, but that would mean I needed to right-click al the feeds (100+) so I needed another way to modify all the feeds. Of course the Windows RSS Platform has an API, so some programming will come to the rescue. I originally thought that this would be an excellent opportunity to delve into Powershell, but it appears that Powershell is not yet available for Vista at this moment
So some JavaScript to the rescue. Run it using cscript, and all feeds will be modified.
var feedsManager, rootFolder;
feedsManager = new ActiveXObject("Microsoft.FeedsManager");
rootFolder = feedsManager.RootFolder;
iterateFolders(rootFolder);
function iterateFolders(folder)
{
if (null == folder) return;
var currentFolder;
var e = new Enumerator(folder.Subfolders);
for(;!e.atEnd();e.moveNext())
{
currentFolder = e.item();
iterateFolders(currentFolder);
}
iterateFeeds(folder);
}
function iterateFeeds(feedFolder)
{
if (null == feedFolder) return;
var feed;
var e = new Enumerator(feedFolder.Feeds);
for(;!e.atEnd();e.moveNext())
{
feed=e.item();
//feed.MaxItemCount = feedsManager.ItemCountLimit;
feed.MaxItemCount = 0;
WScript.Echo(feed.Name + ": " + feed.MaxItemCount);
}
}
Update: I previously set the MaxItemcount to the ItemCountLimit (2500), set it to 0 to set it to unlimited

