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+0x31) [0xb3ed78b1]
#2 /usr/lib/libX11.so.6(_XReply+0xfd) [0xb3f2c29d]
but NetBeans seems to start without a problem.
(solution adapted from The Telarah Times)
Tags: NetBeans, Ubuntu
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.
- 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
- unpack the rubygem-0.9.4.tgz with
tar -xzvf rubygem-0.9.4.tgz
- create the directory where you will store your rubygems:
mkdir ~/.localrubygems
- 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)
- change to the directory with the rubygem source
cd rubygem-0.9.4
- 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
- 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:

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

Now is time to try some real Ruby programming to find out whether this solution poses some problems.
Tags: installation, Linux, NetBeans, Ruby on Rails, Ubuntu
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.

Tags: photography, water
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.