Friday, December 12, 2008
Install Starling on Windows
We've started performance testing. While a big step in nearing completion of our alpha, we're unfortunately working on two new pieces of functionality. I'll detail later. For performance, we've implemented two new components to get memcache to work really well (Starling and Workling):
Starling: "Starling is a light-weight persistent queue server that speaks the MemCache protocol. It was built to drive Twitter's backend, and is in production across Twitter's cluster." - It was open sourced by the guy's at Twitter, so thanks Twitter.
Workling makes working with Starling easier: "easily do background work in rails, without commiting to a particular runner. comes with starling, bj and spawn runners"
But... I just wanted to post a note to other Rails developers who are trying to install Starling on Windows. The gem fails the install due to C compilation failures. While you could get a C compiler working on your box to make things like this easier, it's not that simple. I've been struggling with integrating a native C compiler with my Rails environment for a while. The Microsoft version would probably work better, but I don't have it. And I'm not paying for it.
Anyway, in order to install Starling, you need to manually install the last eventmachine version that has a windows compiled gem (that's what's failing in the gem starling install), which is version 0.12.0. Thanks Stackoverflow (here)
gem install eventmachine --version=0.12.0
Once that installs run this:
gem install starling
Voila - set to go.
Another cool project is: Rubyinstaller (here), which aims to take care of the install problems I experienced above. Hope that helps
UPDATE: You will most likely get this error when you try to startup: custom_require.rb:27:in `gem_original_require': no such file to load -- syslog (LoadError)
This has been fixed in version 0.9.9 but is not yet available as a gem. You can download the source and overwrite your existing files. The files you need to overwrite are server.rb and server_runner.rb. The paths' are in the downloaded tarball so you can easily see where to put them.
UPDATE to UPDATE: So it looks like I'll need Cygwin to successfully run this on my Windows box. Why? Because there's no fork() process that's native to Windows. Cygwin fudges one together. This is a bigger pain than I thought. I'll probably take Kenny's advice from his comment and grab myself a Mac. I never thought that would happen.