Problem with openssl with Ruby 1.8.6 on Ubuntu Fesity 7.04
Just fixed an issue with openssl not working correctly with Ruby 1.8.6 (installed from source) on Ubuntu Feisty (server).
$ cat /etc/issue Ubuntu 7.04
After deploying a new Rails application I restarted mongrel but all requests were returning errors (500); the production.log indicated the following issue:
no such file to load -- openssl
To rectify this I had to do the following.
$ sudo apt-get install libopenssl-ruby $ sudo apt-get install libssl0.9.8 $ cd ~/src/ruby-1.8.6/ext/openssl $ ruby extconf.rb $ make $ sudo make install
To test that openssl is working correctly use irb:
irb(main):001:0> require 'openssl' => true
References
- http://linuxbrit.co.uk/rbot/ticket/69
- http://www.ruby-forum.com/topic/90083
Typo and Rails / MySql problems
The blog is back up again (also moved to the root of the domain) – and hopefully running quicker now thanks to a quick change of hosting setup (Apache and fcgi to pound proxying to mongrel_cluster).
One quick note to anyone experiencing the following problem with Typo running on Debian Linux:
Lost connection to MySQL server during query
The recommended ‘fix’ is to gem install mysql. Doing that on a Debian machine will result in numerous errors unless you also do the following:
$ apt-get install libmysqlclient10-dev $ gem install mysql
(Thanks to the owner of this blog for the pointer, found via google).
Debian package management with APT - remove unused packages
/var/cache/apt/archives can build up a lot of cruft…
Clear out package files no longer available:
apt-get autoclean
Clear out all downloaded package files:
apt-get clean
Repairing a RAID5 software array (Debian Linux)
RAID5 software arrays in Linux are very simple to setup and should run smoothly. Inevitably something will go wrong – but luckily that’s why we use RAID5 – there should be no data loss.
Software RAID HOWTO is the best reference.
Check the RAID
Identify the problematic disk [UU_]
mdadm --detail /dev/md0 cat /proc/mdstat
Remove failed disk
mdadm /dev/md0 -r /dev/hdg1
Add new disk
mdadm /dev/md0 -a /dev/hdg1Once rebuilding has started you can check the status via
/proc/mdstat (depending on the array size it may take quite a long time).
cat /proc/mdstat
Personalities : [raid5]
md0 : active raid5 hdg1[3] hdc1[0] hde1[1]
488391680 blocks level 5, 128k chunk, algorithm 2 [3/2] [UU_]
[>....................] recovery = 0.8% (2098944/244195840) finish=205.3min speed=19648K/sec
unused devices: <none>

