Type Slowly

Jan 17

Installing Thrift on Ubuntu Oneiric, with Ruby 1.9.2 (via RBenv) and Haskell

A few notes, to save my sanity if and when I run into this again.

Get the thrift sources from SVN, untar the file, then add a Gemfile to the root of the source tree:

source "http://rubygems.org"
gem "mongrel", "=1.2.0.pre2"
gem "rspec", "=1.3.2"
gem "rake", "0.9.2"

Then run bundle install. The Haskell bindings require the Binary library to be installed in cabal. This needs to be done globally, as cabal by default doesn’t look at packages installed per-user:

 sudo cabal install binary --global

Then you need to do the configure / make / make install dance, running each command with bundle exec:

 bundle exec ./bootstrap
 bundle exec ./configure
 bundle exec make

However, there’s one last gotcha. ‘make install’ needs to be run as root, but in order to ensure it uses the bundled rake and gems, and rbenv’s selected ruby, you need to become root first, then run make install:

 sudo -s
 bundle exec make install
 exit

That should do it!


blog comments powered by Disqus
Page 1 of 1