Agile Development. more fun less stress.

Rails: undefined method ‘[]‘ for #<Enumerable::Enumerator>

Posted: September 29th, 2010 | Author: vid | Filed under: Development | Tags: , , | No Comments »

I was moving an older Rails app to a new server when I encountered this error. This gives a good description of what was going on and shows how to fix it:
http://groups.google.com/group/attachment_fu/browse_thread/thread/502dd4504a59c84d.
Ruby 1.8.7 and acts_as_attachment didn’t get along with each other in my case. However, there’s a typo where .first == ‘/’ is replaced.
starts_with(‘/’) should be starts_with?(‘/’).
That’s no rocket science but could be useful for noobs (on Rails).


Ruby: Convert Strings from UTF-8 to LATIN1 (ISO 8859-1) with Iconv

Posted: April 30th, 2009 | Author: vid | Filed under: Development | Tags: | No Comments »

I used VPIM to create VCards from employees in my database which stores the employee’s data UTF-8 encoded. Then I wanted to give the user the possibility to download them. And of course half of the employees’ names were corrupted because I didn’t convert them to LATIN1 (ISO 8859-1). so here’s what i came up with:
Read the rest of this entry »


RubyGems: undefined method ‘manage_gems’ for Gem:Module (NoMethodError)

Posted: April 30th, 2009 | Author: vid | Filed under: Development | Tags: , , , , | 63 Comments »

Update: There’s a more efficient solution to this problem here: The Easy Fix

After updating RubyGems I got the following error message:
Read the rest of this entry »


Installing sqlite3 for Rails on Windows XP

Posted: April 29th, 2009 | Author: vid | Filed under: Development | Tags: , , , | 1 Comment »

Here is a short description how to install sqlite3 with RubyGems on Windows XP.

Read the rest of this entry »