Fix Gemfiles and sandbox for Rails 4 testing