'Uncategorized' Category
-
Apr012011
Cucumber and i18n with interpolation
Share
If you are using cucumber to test a multilingual app, you should check out this post for a step definition that you can use to test multilingual strings. However, most likely you would be using variables in your translation strings. Assuming you have pickle installed (if you don’t you should), you can use the step [...] -
Mar092011
Rails + MySQL scaling on a budget
Share
aka .. can’t throw hardware at it
Just when I decided to focus fulltime on my new startup SupportBee, our first product Muziboo decided to grow (no complaints though). We went from about 10k visits a day to about 30k visits a day in a month’s time. Muziboo was my first web programming experience and in [...] -
Feb132011
Hosting your git repo on your own server
Share
Hosting a git repo yourself is a very simple exercise. If you don’t need (or don’t want to pay for) features offered by github, you can setup your server to host your git repo. All you need is a server with ssh access. Here are the steps that you need to follow
Login to your serverssh [...]
-
Sep222010
Flexmock Error: undefined method `destroyed?’
Share
If you are using flexmock for testing your rails code and you are mocking an active record model using flexmock(:model, Model), you may get an error like
undefined method `destroyed?’
The problem is that flexmock defines a lot of methods/attributes like id and new_instance? etc but does not define a destroyed? method that rails now expects. [...] -
Apr062010
Updated Blackbook gem
Share
I just pushed some changes to my fork of the blackbook address book importer gem. Here is a list of changesThe gem now works with the latest version of mechanize and nokogiri
Myspace and Gmail importer working perfectly. Myspace had changed its url scheme and also address book rendering stuff so the gem was broken for [...] -
Nov262009
Externalinterface not working in Firefox but working in IE for invisible swf
Share
Yes … as unrealistic as it may sound, yesterday, I ran into an issue where something worked in Internet explorer but not in Firefox. I was trying to call an actionscript functions on a swf file from javascript. This is a fairly standard thing and is well documented on the web. I followed all the [...] -
Nov142009
Resizing existing images uploaded using file_column
Share
File column is a great plugin by Sebastian Kanthak for uploading images (and other files) in a rails’ site. The plugin has rmagick integration and can create thumbnails automatically for you. We use it for Muziboo and have been pretty happy with it (yes despite the rmagick dependency). We recently had to update the thumbnail [...] -
Sep172009
Authentication error while fetching gmail contacts using blackbook
Share
Blackbook gem can be used to fetch contacts from gmail, yahoo and hotmail address books. However I recently found out that it would throw up a ‘Must be authenticated to access contacts’ error everytime I tried to import gmail contacts. On digging deeper, I found out that google has changed the contents of its cookie and blackbook uses this cookie [...] -
May042009
Use RedCloth to nofollow all user generated links
Share
Nofollow attribute in link tag makes sure that search engine bots don’t use the link for crawling the destination site. This is a measure to combat link spam and to make sure that you don’t pass link juice if you don’t want to. This is especially important for user generated content sites as they have [...] -
Apr222009
Javascript and CSS debugging on internet explorer
Share
It comes as no surprise that when it comes to Javascript, browsers such as Firefox and Safari are more forgiving than Internet Explorer. Also tools like Firebug make javascript debugging very simple. However firebug (just like firefox) does not seem to mind issues like an extra comma or a missing semilcolon and this makes everything [...]