The short answer is that the ACE editor was built to run in Node.js not Rails, so there's no simple way to do this. Remember that most npm
packages are intended to be used as server-side javascript with running on the Node.js environment and wont be runnable directly within Ruby. I believe th Ace Editor requires a Node.js backend and I doubt it would be trivial to have it run in a Rails backend.
Of course, any javascript which runs in the browser can be integrated the Rails asset pipeline. Towards this end I recommend checking out Bower, which is the most commonly used package management system (http://bower.io). You can install directly within your Rails application, though I'd recommend checking out Bower rails for better integration with Rails conventions and the asset pipeline https://github.com/rharriso/bower-rails.
If you want to try porting platform-agnostic javascript to the browser you can check out browserify, which simply links javascript files using the CommonJS require
format that Node.js uses. It won't magically make server-side javascript frameworks like Express or the ACE Editor work solely in the browser, however.