Netbook + Ubuntu = Developing While Travelling
I’m planning on going away travelling for around 6 months (maybe more, maybe less, I’m not sure yet). During this time I obviously plan on enjoying the places I’ll be in, but I do plan on having some down time to write blog posts, process photos, and also do some development. It’ll hopefully be an enlightening time to try out some ideas and also improve my programming skills.
Introducing Rakeoff… a .Net build framework
I’ve recently been working on a build framework using Ruby. Having been a .Net “build master” of sorts for the past few years I’ve stumbled across many build configurations and problems. And as much as I like being a build master, I want to make my job as easy as possible. Enter conventions! We apply them everywhere else in development, why not in our build scripts. With this in mind I set about creating a set of intelligent, convention-based (but overrideable should you really wish) rake tasks. I chose Ruby because I find it flexible and quick for writing tasks, and well suited as a build language. The BDD frameworks available make testing the tasks easy.
Ruby, RubyGems, Synaptic and setting paths
I wrote an older article on installing ruby 1.9.2 in Ubuntu. This initially worked fine for me, but recently I started getting random issues across three different pc’s. I gave up trying to solve the issues in the end and decided I’d revert to using ruby provided by synaptic (1.8.6, so it’s all properly package managed). I went through the pain of removing the installed ruby 1.9.2, then proceeded to install ruby via synaptic.
Installing Ruby in Ubuntu 9.10 (and OpenSSL)
In the package manager for Ubuntu (Synaptic) we already have a “ruby” package. It wasn’t until recently though that I realised the “rubygems” part just didn’t work. Now that I’m depending on libraries such as “mocha” this is a blocking factor. There seems to be an ongoing argument between the ruby community and Ubuntu developers as to how it should all be managed (via gem or synaptic, or both). As far as I was concerned, I just want it all working so didn’t step into the debate. Instead by going on various forums and blogs, I’ve composed an all-in-one script that will install ruby v1.9.1 in Ubuntu.
Here it is, just paste the whole lot into a terminal window, and run it:
sudo apt-get remove -y ruby ruby1.8 ruby1.9 ruby1.9.1 rubygems rubygems1.8 rubygems1.9 rubygems1.9.1 &&
sudo apt-get autoremove -y &&
sudo apt-get install -y build-essential zlib1g-dev libssl-dev libopenssl-ruby &&
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p376.tar.gz &&
tar zxvf ruby-1.9.1-p376.tar.gz &&
cd ruby-1.9.1-p376 &&
./configure &&
make &&
sudo make install & &cd ext/openssl &&
ruby extconf.rb &&
sudo make install &&wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz &&
tar zxvf rubygems-1.3.5.tgz &&
cd rubygems-1.3.5 &&
sudo ruby setup.rb;
You should be all setup. When installing gems, just make sure you use “sudo”, ie sudo gem install rspec
sudo gem install rspec mocha net-ssh
--with-openssl-dir=/usr/local/ssl