(The following is not a Rails-specific question, but relates to a problem that affects Rails, so I wonder whether anyone on the team has an opinion about it or knows whether a solution is already in development.)
While gem dependencies can be easily managed in a Gemfile by Bundler, when it comes to other assets, you either have to manually copy javascript files into the app/assets or vendor directory or find a gem that someone is keeping up-to-date that contains the Javascript, etc. files that you need that they in turn have to keep up to date with the original project from which the Javascript originates. This is not good for Rails long-term, because gems will end up showing up in rubygems for every Javascript library or framework and some may or may not be kept up-to-date, which just makes developing an application for Rails more difficult.
I happen to notice recently that someone made a request in the AngularUI project asking for them to add an npm for it, but AngularUI is client-side javascript (like Rails’ assets), and npm/npmjs.org is for node, so it is primarily a serverside repo/not meant to be for clientside, so stopped in its tracks: https://github.com/angular-ui/angular-ui/issues/184
There is also CPM which is like NPM but for javascript. However, you have to sign a Dojo CLA that many may not want to sign in order to share an asset with others: https://github.com/kriszyp/cpm
Maybe there is something else out there to package assets (at least javascript assets) generically, or perhaps someone from the Rails community could develop something that would allow Javascript library/framework developers to define a file similar to a gemspec, but that wouldn’t lock it into having to live in the vendor, etc. directory in their project. Then maybe the gem command could be able to process such a file somewhat similar to a gemspec and even lay the project out as part of packaging so that it would have a lib/libraryname/version.rb, etc. and would work as a gem and be injected into the asset pipeline if included?