Skip to main content

Posts

Showing posts from February, 2012

Installing Sproutcore (stable and dev) on Linux

This is just a note-to-self kind of post. Official instruction, available here, do not explain how to setup the development version (which currently is 1.7.1.beta).

This is the full list of command (ran and tested on Ubuntu Lucid Lynx 10.04), just need to type the occasional yes.


For those cases when bundle fails (happened to me) to create the bin directory with the beta version of sc-* tools just type the longer variant:

bundle exec sc-server

SC.ContentDisplay

I'm writing this post just to share an interesting conversation that popped up on #sproutcore this week. Sproutcore is a huge framework and there is no amount of documentation that will explain it all, that's why I suggest you hang out in IRC. Even if you don't have questions to ask you'll learn a lot from others'.

In this case the question was: how do I make my custom view update whenever one of the content object properties change?
The perfect case for this, I think, would be if we were writing a custom SC.ListItemView.

In my case, prior to discovering SC.ContentDisplay I used the following configuration in a custom ListItemView:

Maps.OpenLayersLayer = SC.View.extend({ content: null, displayProperties: ["content", "content.order", "content.visible", "content.opacity", "content.cql_filter"], [...]
While it works (it was, I quote, described as funny though) this is the recommended way to do it:

Maps.OpenLayersLayer …

Testing provisioning scripts with throw-away VMs

Using expendable virtual machines for testing purposes is hardly a new concept.
Now pretty-please-with-sugar-on-top would be automating the whole create-provision-test-destroy cycle.

Enter Vagrant. Vagrant is a tool for building and distributing virtualized development environments. It allows automated creation, provisioning (with Puppet, Chef or shell scripts) and tear down.

Installing Vagrant on Ubuntu 10.04 LTS (which I'm still running) requires the following:

a 4.1.x VirtualBox distribution (the 3.1 bundled with Ubuntu will not work)a recent version of ruby (you guessed it: the 1.8.x bundled with Ubuntu will not work) To install VirtualBox add the following repo to /etc/apt/sources.list:
deb http://download.virtualbox.org/virtualbox/debian lucid contrib non-free then issue the usual apt-get update and install with (remove stock packages first): sudo apt-get update sudo apt-get remove virtualbox-ose virtualbox-ose-dkms sudo apt-get install virtualbox-4.1 Ruby is a more complicat…