update gems, requirejs

update gems, requirejs, and fix compatibility with 4.1