Oxfam - Be Humankind TV advert

April 19, 2008 – 10:47 pm

Watch the new Oxfam TV advert and believe that you can make a difference, even if it is a tiny one. You could start by purchasing gifts from Oxfam Unwrapped.

Photos from Turin

April 15, 2008 – 10:39 pm

Recently I came back from a trip to Turin. The old part of the city is very pretty, but it seems that I took the rain with me :) However, I had the chance to take a few “arty” photos with reflexions instead of/in addition to the usual photos of pretty old buildings. You can see all the photos in my photogallery. Below is just a small selection of them.

Reflexion 2 Church Roman wall

Do we really live the most peaceful times?

March 17, 2008 – 12:05 am

Steven Pinker seems to believe so. This idea is also investigated in his book The blank slate. Maybe it is about time I read it.

Getting Netbeans to run on Ubuntu 8.04 (development version)

February 22, 2008 – 11:17 pm

I have recently updated my Linux to the development version of Ubuntu 8.04. Even though it is still alpha release it is surprisingly stable. However, it is not possible to start Netbeans (or any other Java application). If you want to run Java program you need to type the following:

export LIBXCB_ALLOW_SLOPPY_LOCK=true

in a terminal before you start the application from command line. If you do this, you still get an error like:

Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb3ed7767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0×31) [0xb3ed78b1]
#2 /usr/lib/libX11.so.6(_XReply+0xfd) [0xb3f2c29d]

but NetBeans seems to start without a problem.

(solution adapted from The Telarah Times)

Installing Ruby gems in NetBeans 6.0

February 16, 2008 – 11:44 pm

One of the great features of the new NetBeans 6.0 is the possibility of developing Ruby code with it. Unfortunately if you run Linux you will find out that you cannot directly use the RubyGems you have installed with your distribution unless you set some very generous file permissions or run NetBeans as root. None of these solutions is appealing. A much better solution is to install your own version of RubyGems. The NetBeans wiki explains how this can be achieved, but unfortunately it does not work in my case (I am currently running Ubuntu 7.10). I suspect that this is due to some changes in the way RubyGems have to be installed. The rest of this post explains the steps I took in order to install RubyGems on my computer and use them in NetBeans 6.0.

  1. Find out which version of RubyGems is installed on your computer and download the same version from RubyForge (Given that NetBeans will be the one who will manage the Gems I suspect that this is not so important. However, it is likely that it will save lots of headache if you do not always want to run your Ruby programs from NetBeans). In my case I have rubygems version 0.9.4-1ubuntu1, and therefore I downloaded the 0.9.4 version
  2. unpack the rubygem-0.9.4.tgz with
    tar -xzvf rubygem-0.9.4.tgz
  3. create the directory where you will store your rubygems:
    mkdir ~/.localrubygems
  4. create the directory where the lib files are stored.
    mkdir ~/.localrubygems/lib

    This step is not compulsory, but unless you set this option a lib directory is created in your home directory (which I did not like)

  5. change to the directory with the rubygem source
    cd rubygem-0.9.4
  6. install rubygems:
    GEM_HOME=/home/dinel/.localrubygems/ \
    ruby setup.rb all --installdirs=home \
    --prefix=/home/dinel/.localrubygems/ \
    --libdir=/home/dinel/.localrubygems/lib/

    the –installdirs=home indicates that the installation is done in the user’s directory and the –prefix and –libdir indicated where the files which go in the lib dir are stored

  7. that’s it. The installation is complete now.

In order to use NetBeans with Ruby you need to set the GEM_HOME and GEM_PATH environment variable and start NetBeans:

	export GEM_HOME=/home/dinel/.localrubygems/
	export GEM_PATH=$GEM_PATH:/home/dinel/.localrubygems/
	netbeans

If everything went fine you should be able to go to Tools/RubyGems and see:

Ruby gems window

Select the New Gems tab, click Reload Gems button and you will see all the Gems available for installation:

The ruby gems window

Now is time to try some real Ruby programming to find out whether this solution poses some problems.

Photos from Paris

February 16, 2008 – 12:23 am

I recently had to fly to France and I had the chance to spend a bit of time in Paris. Here are a few photos I took. I will post more in the days to come and the whole collection will make it at some point on my photogallery.

Water 1 Water 2 Water 3

Hello world!

February 3, 2008 – 5:02 am

Last week I have decided to change my hosting company. Reasons? … too expensive, no database, too little space … and no Ruby on Rails support. So all I can say for the moment is Welcome to my new super duper blog. The previous entries are no longer available, but hopefully some of them will be restored. While I am moving my site and making everything working you can enjoy my photogallery.