Basic working version after Rails update tribulations