Fix persistence and reloading
Fix up gemfile for rails apps