Posted by Andreas on Thursday, April 03, 2008 at 07:00 (CEST)
Yesterday, in my post about upcoming features in Rails 2.1, I wrote, that Git gets more and more attention in the Ruby on Rails scene recently – and this morning, I stumbled across a post from David, where he annonced, that Ruby on Rails itself is moving from Svn to Git.
That was a rather welcome news to me, since I personally use Git for quite some time now and have switched all my repositories to Git a while ago. However, some people seem to be concerned about Svn being dropped by Rails. But it’s not as bad as you may think, since this doesn’t mean that you have to move to Git as well…
Read more »
Posted by Andreas on Wednesday, April 02, 2008 at 04:52 (CEST)
Ruby on Rails 2.1 is almost here and there are several interesting features coming with it. Among many little details, performance optimizations and some bug fixes, my favorites are:
- ActiveRecord named scopes
- ActiveRecord dirty field checking and partial updates
- Built-in gem dependencies
Read more »
Posted by Andreas on Sunday, March 23, 2008 at 15:42 (CET)
This weekend, the error message “device or resource busy” almost drove me crazy when I was trying to assemble (activate) a software RAID array.
I was experimenting with a software RAID-1 setup (two mirrored disks) using VirtualBox before planning to deploy it to a live server. Because I never liked the idea of creating 4 partitions on each disk and mirror them with individual arrays (/dev/md0 to /dev/md3), I planned to create one partitionable array that spans the whole disks (/dev/md_d0). I.e. the one and only array /dev/md_d0 consists of two whole disks /dev/sda and /dev/sdb. The advantage: the second drive is an exact copy of the first one – even partition table and master boot record are identically – just like with a hardware RAID. So in emergency cases, you can even use one of the disks directly, without activating RAID drivers.
Read more »
Posted by Andreas on Tuesday, March 04, 2008 at 00:16 (CET)
I encountered a really odd phenomenon with syslog-ng yesterday. A mail- and web-server with considerable traffic was disconnected from the net for some hours during a router failure. After the router came back online and the server was reachable again, I noticed an unusual high system CPU load. Strangely, the server itself wasn’t changed in any way (it wasn’t even shut down) and suddenly the CPU utilization raised to around 80%, whereas it normally stays under 20%. Strange thing was, that most CPU time seemed to be eaten up by the syslog-ng daemon.
Read more »
Posted by Andreas on Monday, March 03, 2008 at 01:26 (CET)
A few month ago, I wrote about my wireless mouse at home suddenly stopped working (losing sync to the receiver) and how to fix it.
Now it happens that I got an eVolution Orca (the successor of the Marlin) at the office. Guess what happened… A few days ago, the keyboard stopped working… The Orca doesn’t have any LEDs or switches and changing betteries didn’t help, so I called the support hotline again. Indeed there again is a method to reset and re-sync the keyboard: Take out the batteries and leave them out for 5 to 10 minutes. Indeed that worked for me.
I wonder what’s up with the Cherry eVolution devices that they occassionally lose their connection. With my Marlin wireless desktop at home, the mouse stops working every few weeks and has to be re-synced like described in my other posting. And now it’s the eVolution Orca at my office too. That doesn’t happen more often hopefully, since re-syncing means to take out the batteries for 10 minutes, which would be really annoying in the long run.
Posted by Andreas on Tuesday, February 12, 2008 at 08:08 (CET)
After updating to the latest edge Rails via SVN today, my local development webserver suddenly started to respond with a 500 application error for every request. The mongrel console revealed:
NoMethodError (undefined method `file_exists?’ for #<ActionView::Base:0x2aaaac3eee10>):
/usr/lib64/ruby/gems/1.8/gems/gettext-1.90.0/lib/gettext/rails.rb:280:in `render_file’
/usr/lib64/ruby/gems/1.8/gems/gettext-1.90.0/lib/gettext/rails.rb:278:in `each’
/usr/lib64/ruby/gems/1.8/gems/gettext-1.90.0/lib/gettext/rails.rb:278:in `render_file’
/vendor/rails/actionpack/lib/action_controller/base.rb:1107:in `render_for_file’
/vendor/rails/actionpack/lib/action_controller/base.rb:841:in `render_with_no_layout’
:
:
Digging deeper, I found out that the method ActionView::Base#file_exists? has been moved to a different place in Rails’ Changeset 8683. Fortunately, fixing it is easy.
Read more »
Posted by Andreas on Friday, February 08, 2008 at 11:16 (CET)
Finally, today I dumped my WordPress installation and switched to b2evolution. Playing around with b2evolution for the last few days, I am surprised how such a nice blog software could exist without me noticing it earlier.
Unlike WordPress, b2evolution has cleanly written structured code and lots of more features (and you don’t get new security issues every week or so). Sure, there aren’t as many plugins and themes available yet, but skins and plugins are well structured and easy to learn, so it was no problem at all to get all the features.
Migration was pretty easy. I just installed an export plugin to WordPress that exported all postings into MovableType format and imported that data with the b2evolution MovableType import function. All postings, comments, trackbacks and categories were converted and I later added tags to each posting manually.
Posted by Andreas on Monday, February 04, 2008 at 11:02 (CET)
This weekend, I switched our webserver from Apache 2.2 using name-based virtual hosts to Lighttpd 1.4.18. This was something I wanted to do for month now, since Lighttpd seems to be much easier to configure and maintain when it comes to name-based virtual hosts, FastCGI applications (like Ruby on Rails) and SSL. Since Lighttpd gains more and more popularity, there were almost no problems migrating from Apache to Lighttpd. Especially name-based virtual hosts are easier to configure in Lighttpd.
Read more »
Posted by Andreas on Thursday, January 24, 2008 at 11:01 (CET)
If you use gettext in your web application, you’ll sooner or later have to face the problem of handling links that should be embedded into a translated text. What can easily be done in a normal, non-localized template with ERb, can become a nightmare if used extensively in localized templates. However you can prevent yourself (and your translators) a lot of nightmares by using a small helper method.
Read more »
Posted by Andreas on Saturday, November 17, 2007 at 18:11 (CET)
A minor bug in TMail (which is used in Rails’ ActionMailer) got fixed finally.
About 2 years ago, I reported bug #6015 to the Ruby on Rails bug tracker. TMail’s create_forward method always returned the first body part of a newly created forwarded mail instead of the forwarded mail itself. Therefore the create_forward method was practically useless. At that time, the ActionMailer and/or TMail developers didn’t seem to be very active. Well… nobody cared about this for about two years.
After I heard that TMail got a new maintainer, I gave it another try and submitted bug #15445 to the newly created TMail bug tracker. Mikel (who is the new TMail maintainer) applied and tested a fix, so the upcoming TMail version will come without this bug. Thanks a lot, Mikel.
Let’s hope this fix will make it into Rails 2.0 so that I can dump one more workaround in my application soon.