Archive for the ‘Ubuntu’ Category

Installing Drupal on Ubuntu (Gutsy) in a few easy steps

Friday, November 28th, 2008

Drupal is a great solution if you’re looking for a CMS system. In order to sneakily install LAMP with the minimum of fuss, I usually just install mod php and mod mysql (the apache related modules for php and mysql respectively) and that triggers pretty much everything else to be pulled automatically! So, from the command line…

sudo aptitude install libapache2-mod-php5

sudo aptitude install php5-mysql

… should give you Apache, MySQL and PHP in one fell swoop. Just to be sure that all is well run the following install commands

sudo apt-get install mysql-server
sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install php5-mysql

Then download and install Drupal (version 6.6 at time of writing) at http://drupal.org and follow their install guide.

One final tip, if there’s any problem with your apache installation’s configuration, you can install phpMyAdmin in order to plough through these problems as it will supply its own configuration. For example, I got the database configuration error when I was trying to connect to my database for the first time using Drupal

“Your web server does not appear to support any common database types. Check with your hosting provider to see if they offer any databases that Drupal supports.”

Turns out my apache config was dodge as when I did a ’sudo apache2ctl restart’ I got the following…

“apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName”

Installing phpMyAdmin and choosing apache2 when prompted during this process did the trick. Now go forth and Drupal!

3 Cheers for OSS Barcamp Dublin!

Sunday, November 23rd, 2008

Another exciting event has just been announced for Dublin next year with an Open Source Software Barcamp planned for Dublin March 28th next year. And you could be one of the speakers! The idea behind a barcamp is to have a casual relaxed atmosphere where the attendees can help drive the schedule - like a conference done in the spirit of Digg. For more info check out Laura Czajkowski’s blog post and if you want to keep up to date with further details you can track things on ossbarcamp on twitter.

Recording Sound in Kubuntu 8.10 (running KDE 4.1)

Sunday, September 14th, 2008

Exciting times ahoy! This weeks mystery was to get sound recording with the minimum of fuss. We’re not sure what soundcard is running inside the Dell Inspiron 1520 which was our test laptop but it seems to report itself as an HDA Intel SigmaTel STAC9205 in the system settings. Anyway, the first thing to do was to apt install audacity which can then be used for testing the recording functionality. Not being sure if the laptops builtin in mic had been detected correctly, we jacked in an external microphone into the mic socket.

This didn’t produce any encouraging results initially when we tried recording in audacity so we opened up the KDE volume controls by clicking the speaker icon on the taskbar and electing to open the mixer. Unfortunately the GUI controls for the mixer doesn’t have the full complement of volume controls so it was the good ol command line to the rescue - typing alsamixer in terminal brings up a nice range of controls. You can navigate between screens of controls with the tab key and jump from control to control using the left/right arrow keys. The trick was to navigate to the two controls marked ‘Capture’ and bump up the volume (they also need to be activated by pressing the spacebar when you’re on the control). Additionally, there were two controls marked ‘Digital’. One of these controlled the volume of the mic (via the up and down arrows) and the other switched between analog and digital mode (again via the up and down arrows). We found that the latter had to be set to ‘Analog I’ for the best result.

Then it was back to audacity to record a bit of chatter - and then lament how weird ones voice sounds when recorded! Now get mixing mon amis!

QUICK UPDATE (14 Sep 08)
One issue that occurred was that after recording a sample, it couldn’t be played back(”Error while opening sound device. Please check the output device settings and the project sample rate.”). Additionally, a second track couldn’t be recorded. The solution to these problems was to open the Preferences dialog and set both the Playback and Record devices to ALSA (default). Reference: http://audacityteam.org/forum/viewtopic.php?f=18&t=3377

Uninitialized Constant GemRunner Error When Using Ruby Gem

Sunday, December 9th, 2007

Here’s the problem…

me@host:~$ sudo gem update
/usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError)

… which had us on the ropes more than on the rails for a while. Unusually googl’ing on this error provided no solutions.

What led to the situation was that we used the source install of rubygems on Ubuntu Gutsy (7.10) instead of using the rubygems in Ubuntu’s repository but then changed our mind and apt-getted the Ubuntu repository version. Surprise! Surprise! These 2 versions were conflicting a bit; leading to the above error. The workaround is pretty simple, just go to your /usr/local/lib section and delete the site_ruby directory (as this is the remnant of the rubygems source install and thus cause of the problem). This removes all the gems (that were downloaded by the original rubygems which we no longer want) off our system. Perhaps you want to simply move this directory first in case something goes wrong and you need to revert (eg. sudo mv /usr/local/lib/site_ruby /usr_local/lib/site_ruby_old).

Note: In case your not aware, /usr/local/* is the set of directories under which programs that you compile yourself get installed to by default. Generally the directories will start out pretty empty on a freshly installed Linux distro and then as you (if ever!) compile and install programs from source (eg. using ./configure && make && make install) then they end up under this directory. Also not that programs installed using apt-get (or via rpms on non-Debian systems) don’t get put here - they usually end up under the /usr/ directory itself (this varies a bit from distro to distro but what we’ve just outlined holds true for Ubuntu anyway).

Now, once your finished you should find that gem works. Do a ‘gem list’ and see if the above error is gone. If this doesn’t work you may need to ’sudo apt-get install rubygems’. Next up, we need to rebuild that gem directory that we deleted (site_ruby) with the apt-gotten rubygems (if apt-gotten is a real word!). To do this run

’sudo gem update’
’sudo gem update –system’

You will notice that the result of these commands means that /usr/local/lib/site_ruby is back and populated. This is where ruby likes to put it’s gem extensions. Finally reinstall rails with

’sudo gem install rails’

Hope this solution works for you! We’re still getting to grips with this rails stuff so if you find any glaring errors in this post please comment below to let us know.