Archive for November, 2010

Ruby 1.9 CSV undefined method map for String

November 12th, 2010 | Category: Development

I’m in the process of upgrading an app running Ruby EE 1.8.7 to Ruby 1.9.2. Since FasterCSV is no longer available, I had to convert the code to use the internal CSV lib.  In doing so, I ran into the above error.  Looking at the source for FasterCSV <<, there was a catchall else statement that would handle passing a string and convert it to an array to become a row.

    def <<(arg)
      if arg.is_a?(Array) and arg.size == 2  # appending a header and name
        @row << arg
      elsif arg.is_a?(Hash)                  # append header and name pairs
        arg.each { |pair| @row << pair }
      else                                   # append field value
        @row << [nil, arg]
      self  # for chaining

In Ruby 1.9 the CSV << method is expecting an Array or CSV::Row. Easiest fix for me as to just make my string an Array. Hope this helps!

1 comment

Ubuntu 10.10 Thunderbird 3.1.6 LastPass addon disables password manager

November 05th, 2010 | Category: Linux,Ubuntu

In my quest to find a good password solution, I tried LastPass. This was a very intrusive password manager on both Firefox and Thunderbird. I promptly removed it after about a day of use. However, removal of the addon left traces of itself throughout my settings. It completely disabled Thunderbird’s integrated password manager. I was lucky enough to find an article at mozillaZine with details on how to re-enable this feature.

Here are the details from their site:

No checkbox to remember passwords

It can happen that you will find no checkbox in Thunderbird to remember passwords. To change this, you will need to edit the prefs.js file, located in the Thunderbird profile folder.

1. Close Thunderbird and open the prefs.js file in Notepad or another editor (make a backup copy of prefs.js first, as a precaution).
2. Find the following line: user_pref(“signon.rememberSignons”, false);
3. Change the value from false to true.
4. Close the Notepad or editor window and save changes.
5. On the next startup of Thunderbird you should find the checkbox for remembering the password in the password manager.

Instead of editing prefs.js, you can change the same setting via about:config.

While editing prefs.js, I found lots of settings that LastPass left behind. Also, in Firefox “about:config” shows the same situation. All in all, LastPass was a horrible solution. I changed to using FF and Thunderbirds built in password manager with a master password.

1 comment