Wednesday, April 4, 2012

From heaven to hell and back again with Rails, Ruby, Rack, Capybara and sundry others

A few days ago, I started getting an odd error message while running some cucumber features. In a nutshell, the param values returned from a multiple choice selection box arrive as an array of arrays, instead of just an array.

"category_ids"=>["[\"\"]"] vs "category_ids"=>[""]


I posted an issue on the capybara git site. After a brief back and forth, I was graciously informed that I was running older versions of rack (using 1.2.5, current version 1.4.1), and that was likely the problem.

So off I go to upgrade rack. Unfortunately, rack 1.2.5 is a dependency of rails 3.0.11, which is what we are currently running.

Perhaps it is time to upgrade to rails 3.2?

But that requires ruby 1.9.3, which fails to install with rvm on a mac. Apparently, I need an updated version of Xcode. Or, I could use OSX GCC Installer.

If I was running Lion, I could have used Apple's newly released Command Line Tools for Xcode as described by Kenneth Rietz, but alas, I have not yet made the upgrade.

But after installing OSX GCC Installer, and following the recommendation that I delete the old Xcode, I got the following error when attempting to run 'rvm install 1.9.3"

/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:70:35: error: SecurityHI/SecurityHI.h: No such file or directory

So perhaps the OSX GCC Installer doesn't have SecurityHI support.

No comments:

Post a Comment