Dreamhost – SquirrelMail – old-messages folder

Problem
You have left a message in a squirrel mail account in dreamhost for a long time and it gets archived by dreamhost. According to the dreamhost you should be able to get to your archived messages, by looking at the old-messages folder.
The problem is that just by logging in to squirrel mail the folder doesn’t get displayed on the left hand side.

Solution
Log on to squirrel mail and go to ‘Folders’ menu at the top.
In the ‘Create Folder’ put ‘test’ or anything that you would like in the text box, and make sure that in the dropdown box you select ‘INBOX.old-messages’, so your newly created folder is a subfolder of the ‘inbox/old-messages’ folder.
Create the subfolder, refresh the page, and in your left hand the old-messages folder should appear.

Thunderbird – GoogleMail

Problem
You want to add the Google calendar tab in your thunderbird but you don’t want to use the standard google mail calendar, but the one setup for your domain.

Solution
Install the Google Calendar add on in Thunderbird:

Tools -> Addons -> Get Add-ons and then search for Calendar (Google Calendar Tab)

The when thunderbird is restarted go and change the default domain for logging in to the calender in:

Tools – Add-ons -> Extensions

and select the Preferences in the Google Calendar Tab.

from there select the ‘Google Apps for your domain’ and then change the URL into something like:

‘http://www.google.com/calendar/hosted/your_domain_hosted_with_google

Help! I’m getting the message “libMagickWand.so.1: cannot open shared object file: No such file or directory” I know ImageMagick is installed! What should I do?

Problem
Cannot install RMagick as there is an error about nob being able to find some shared libraries.

Solution
After reading the RMagick installation FAQ it seem there is a problem with the LD_LIBRARY_PATH that cannot find the needed libraries as they are installed in /usr/local/lib instead of /usr/lib.
Doing a quick search revealed that people suggest that the LD_LIBRARY_PATH shouldn’t be changed, for various reasons.
So, the quick solution is to create a couple of symbolic links for the libraries that cannot be found, ie:

sudo ln -s /usr/local/lib/libMagickWand.so.4 /usr/lib/libMagickWand.so.4
ln -s /usr/local/lib/libMagickCore.so.4 /usr/lib/libMagickCore.so.4

Rails find case sensitive search

Problem
You want to use find in Rails for a case sensitive search. For example in your authentication logic you have something to find the user to login as in:
u=User.find_by_login(‘username’)
If you don’t want to limit the available logins with case insensitive validation in the model, then the above code will not work if you have ‘Username’ and ‘username’ as available logins, as the find will only return one of them.

Solution
Change the find method to use the BINARY keyword in your database (only used with MySQL), as in the following:
u=User.find(:first, :conditions => [“BINARY login = ?”, login])

ATI Radeon HD-4350 Mandriva 2010 Dual Monitor

Problem
Trying to get Mandriva 2010 to work on a dual monitor with an ATI Radeon HD 4350. Desktop used is a Dell Vostro 430 and two BenQ G920WL monitors.

Solution
After reading the articles here and here, the steps required were:

  • Select driver ATI Radeon HD 2000 and later (radeon/fglrx)
  • Don’t select proprietary driver from next screen
  • Run xrandr -q to find out the name of the monitors
  • From the output find out the current resolution (1440×900), names (VGA_1,DVI-I_2/analog) and maximum resolution (1440×900)
  • Edit the xorg.conf file (/etc/X11/xorg.conf) and add the Virtual 2880 900 (without quotes) underneath the Modes line in the Display Subsection
  • Save the file and restart the X server
  • Run again the xrandr -q command and make sure the maximum resolution has changed to 2880×900
  • Run xrandr –output DVI-I_2/analog –auto –right-of VGA_1 to put one screen next to the other
  • Follow the description here to set it up permanently on login

Problem with Sansa mp3 player automatic connection in Mandriva

Problem
After an upgrade my Sansa E260 is no longer automatically recognised in Mandriva and looking at the /var/log/messages displays the error:
reset high speed USB device using ehci_hcd and address 5

Solution
Run as su the following (maybe a couple of times), while the sansa is connected:
sudo rmmod ehci_hcd
sudo modprobe ehci_hcd

406 Not Acceptable – Princely – Dreamhost

Problem
You get a ‘406 Not Acceptable’ response from the web server when you try to use the princely plugin for generating pdf on a Ruby on Rails application hosted on dreamhost.

Solution
Having tried the ‘Extra Web Security’ settings in dreamhost Web panel, and setting them on/off did not get very far.
Also setting up an .htaccess file didn’t seem to make any difference.
So the mod_security settings did not seem to be the cause of the problem.
Having a look at the apache error log files which in the case of the dreamhost ps are in /usr/local/dh/apache2/logs/apache2-ps_name it turns out that the problem was that the path for the prince binary was not setting up correctly in the file vendor/plugins/princely/lib/prince.rb on line 26.
A quick hack to make it work until finding the reason for the problem is to hardcode the path to the prince binary, so:
@exe_path = `which prince`.chomp
if @exe_path.nil?
@exe_path=’/usr/local/bin/prince’
end

Could not load SystemTimer gem, falling back to Ruby’s slower/unsafe timeout library: no such file to load — system_timer

Problem
You have the error showing up after starting either the server (./script/server) or the console (./script/console).
For my particular case it started appearing after installing the Rails 3.0 beta3 version, and in an application developed with Rails 2.3.2.

Solution
Just install the system_timer gem:
sudo gem install system_timer