For those of us who have yet to take the plunge into Ruby 1.9 it can be quite annoying to convert the encoding of a string to utf-8. I’m using couchdb so it’s quite important when bringing data in that it’s utf-8. Luckily there is a handy standard library called Iconv to help, so if you can’t guarantee the encoding of your data I recommend trying this little snippet to strip out the badness:
ic = Iconv.new('UTF-8//IGNORE', 'UTF-8')
valid_string = ic.iconv(untrusted_string + ' ')[0..-2]
NoMethodError: undefined method `count' for #<Array:0x9c0e3e8>
Getting this error like this when you deploy your Ruby on Rails app to a production server?
You probably need to upgrade the server to Ruby 1.8.7 like me :) Doh! Luckily moonshine has it covered for this one, I just had to switch from using ree to ree187 in my moonshine.yml file.
This worked for me after a bit of faffing:
yum install yum-fastestmirror
yum clean all
yum install preupgrade
rm -rf /var/cache/yum/preupgrade*
Run the final line to blow away the upgrade cache if you run into any problems and need to try again.
UPDATE: Oh and you might need to run gparted to resize your /boot partition. It needs to be at least 300mb!!
The offer UFC made to Fedor today was ridiculous:
- 6 fight contract worth $30 million
- an immediate title shot
- a cut of the Lesnar/Fedor PPV going directly to M-1
- Fedor was free to wear as many items with the M-1 logo as he wished
- allowing Fedor to compete in combat Sambo
A bunch of extremely minor technicalities and semantics are preventing this deal from happening. Crazy Russians indeed.
An interesting discussion (via Daring Fireball) regarding a new alternative to Google Reader called Fever. From what I can gather it seems to be a very polished and personalised version of Techmeme - a fantastic site that, at it’s core, uses algorithms based on link behaviour to determine the hotest topics.
In the post Alex talks about how feed readers are dead and how we shouldn’t be spending so much time in them. I agree that we could all cut down on our subscriptions but I don’t see the feed reader as a dead and useless product. Aggregators are fantastic and allow you to uncover and be exposed to all sorts of news, information and opinion.
I recently challenged myself to cut down on my daily intake of feeds. I found that by killing some heavily bloated feeds and carefully filtering others that I regained control over Google Reader. I haven’t seen the dreaded 1000+ items unread since I did it several months ago.
And that’s the key. It’s not that readers are useless or devoid of useful information it’s just they don’t help us manage the information flow. I used a few basic Yahoo Pipes and subscribed to lower volume feeds to do this and there is no reason why that couldn’t have been included as part of the aggregator itself. Google could do a far better job of filtering than I could and I wish they would expand the product in that direction instead of making it more social.
Everyone is coming at the problem from this strange angle that everything needs to be realtime and you should only be shown the hottest posts when all we really need are better, more intelligent tools to filter the noise out.
If you are a Twitter user and have an iPhone you really should consider Boxcar from the app store. It’s not a twitter client but it does hook into two of the best (tweetie and twitterific).
It simply delivers push notifications whenever you get reply or direct message. This is the way it should be done as regular tweets do not require your immediate attention.
It will completely change the way you use Twitter and make you feel more engaged in the conversation. This is what I had hoped push notifications would deliver in 3.0 and boxcar is the fullfillment of that promise.
I took the plunge and treated myself to a brand spanking new iPhone 3GS this weekend. After much dilly dallying I decided to upgrade from the iPhone 3G because cashinmyfone were offering good rates for trade ins that could cover the cost of buying out my contract. Getting the handset proved to be a bit of mission.
After finally tracking one down at the Apple store in Westfields I had to spend 75 minutes in there going through everything. O2 were not very helpful and were trying to stop the buyout from happening in the Apple store. Of course Apple have been doing contract buyouts for a while, it just depends if the call centre worker they call to verify it knows that.
But I have it and I’m happy. It’s fast as hell, it has a compass and the camera is significantly better (there are hundreds of reviews online if you need to know). Oh and now I’m inline with the yearly release cycle the upgrade hit won’t be to bad next year.
I’m really liking the way Giant Bomb have integrated game achievements into their site recently. You just import your Xbox Live, Steam or WoW account and they track how your doing using some fun metrics. You get graded on how well you have done on each game and in a big nod to Blizzard each achievement has a rarity associated with it.
The great thing is that this is all based on community data, not what they deem to be hard to achieve, so you get a much better idea of who is a hardcore achievement hunter. It makes me even more proud when I look at my Crackdown page. Aside from that it’s just nice to have all your achivements under one roof, and they will be adding PS3 trophies eventually…if that’s your kind of thing.
Watch it people. Is that Malak? Oh yes!
This blog is now running from the fine VPS servers at Linode. I really needed root access with my rails work increasing and Dreamhost just couldn’t cut it. Spending half a day trying to install a single gem is no fun, spending 10 minutes installing an entire rails stack to a new server is.
