crowbar/barclamp-crowbar — pull request #750 by saschpe (2013-10-30 09:34:14+00:00)
Title: Use ActiveRecordStore as session store

When saving a proposal fails due to JSON validation errors (missing
mappings / options / typos), Crowbar presents a flash message with the
JSON parsing error. However, messages like "743: unexpected token at
'{234 "use_virtualenv": false,..." may easily cross the 4k border that
the default session store (CookieStore) can handle. In these cases,
Crowbar just bails out with a 500.

The only solution is to set a different session_store. MemCacheStore
would probably work too but needs more refactoring due to more funny
session object fiddling inside ApplicationController.rb. Therefore it's
probably best to use good old ActiveRecordStore. However, this
re-introduces the dependency on ActiveRecord and it needs a database.
The default sqlite3 should be sufficient since we don't expect many
users to use crowbar at the same time.

Require sqlite3 gem (sqlite3-ruby was renamed)